Cut off the top of the garlic head and discard. Put the garlic on a square of aluminum foil and drizzle with the olive oil. Wrap the foil around the garlic, put in the oven and roast for 50 minutes. Remove from the oven and set aside to cool to room temperature. Once cooled, remove the garlic from the foil and squeeze the garlic head, cut side down, over a small bowl until all of the roasted garlic cloves pop out. Mash the pulp with a fork and set aside.
In a large skillet over medium-high heat melt the butter and cook until it begins to foam, turn light brown and acquire a nutty aroma. Turn the heat to low, add the shallots, and cook for 2 minutes. Add the green beans, roasted garlic, and almonds, and season with salt and pepper, to taste. Transfer the beans to a serving bowl and serve immediately.