The key to cooking perfect green beans is to actually cook them twice. French green beans, also called Haricot Verts are blanched then sautéed with butter and shallots.
Clean the green beans by trimming off the stem end (not the other end).
Blanch the green beans in a large pot of salted boiling water until they are just tender, but still crunchy, 3 to 5 minutes. Taste them frequently. you can watch the color turn from lighter to darker, but the best way is to taste them frequently.
Once cooked, quickly transfer the green beans to a bowl of ice water using a spider or tongs. This will quickly stop the cooking and preserve the bright green color.
To finish cooking the green beans right before serving; place the butter and chopped shallot in a skillet over medium heat, cooking until the butter is melted and the shallot starts to turn translucent, about 1 minute
Add the green beans, stock, and season with salt & pepper.