In a deep skillet, bring 2-3 inches of water to a boil. Add the beans, season with salt and par-boil for 3-5 minutes depending on thickness of the beans. Cool under cold running water, reserve in strainer.
Return the pan to the stovetop and melt the butter over medium heat. Add the onion and stir; reduce the heat to medium-low and cook, stirring occasionally, to caramelize the onion, 25-30 minutes. Reduce the heat if they brown too quickly at the edges. Add the stock and beans and turn with tongs to combine. Season with salt and pepper, to taste.