How to Make It
Heat oven to 350° F. Bring a large pot of water to a boil; add 1 tablespoon salt. Add the green beans and cook until just tender, 3 to 5 minutes. Drain and transfer to a shallow 2-quart baking dish.
Heat 3 tablespoons of the butter in a large skillet over medium-high. Add the mushrooms, season with ¼ teaspoon salt and ⅛ teaspoon pepper, and cook, tossing occasionally, until golden brown and tender, 8 to 10 minutes; transfer to a bowl.
Reduce heat to medium and melt the remaining 5 tablespoons of butter. Add ½ cup flour and cook, stirring, for 1 minute (do not let darken). Whisk in the broth, cream, and ¼ teaspoon salt; bring to a boil and boil and cook for 1 minute. Add the mushrooms to the sauce and stir to combine.
Pour the sauce over the green beans in the baking dish, cover dish with foil, and bake until bubbly, 30 to 45 minutes.
Meanwhile, in a small bowl, toss the shallots with the remaining 2 tablespoons of flour. Heat the oil in a medium skillet over medium heat. Cook the shallots, stirring, until golden brown, 6 to 8 minutes; transfer to a paper towel-lined plate and sprinkle with ¼ teaspoon salt. Sprinkle over the beans before serving.