The addition of toasted pecans gives this French way with string beans a bit of crunch and sweetness as well as a touch of the American South. Try using slender haricots verts for a different twist. This recipe is perfect for a Kwanzaa celebration; read more in "Why the Karamu Feast Is My Favorite Part of Kwanzaa—and a Simple Menu to Celebrate".
Bring water to a roiling boil in a medium saucepan over high heat. Add beans; cook until slightly tender and crisp, 5 to 7 minutes. Drain and set aside.
Heat butter in a medium skillet over medium heat. When the butter is foamy, add garlic, shallot, salt and pepper; cook, stirring constantly, until the garlic is lightly browned, about 2 minutes. Add the beans; cook, stirring constantly, until the beans are completely coated with the garlic and shallot, about 3 minutes. Transfer to a platter and sprinkle with pecans.
For the best flavor, toast nuts before using in a recipe. To toast chopped nuts, place in a small dry skillet and cook over medium-low heat, stirring constantly, until fragrant, 2 to 4 minutes.