Bring a large pot of generously salted water to a boil and cook the green beans for 6 to 7 minutes, until tender.
While they cook, make an ice bath: a large bowl of cold water with 3 tablespoons of salt stirred in, plus several handfuls of ice.
Drain the beans and drop them straight into the ice bath. Stir until they are cool, then drain and dry them well on a clean towel. The beans can be prepared up to this point 2 days ahead and refrigerated, wrapped in paper towels in an airtight container.
Heat the oven to 375 F. Melt 6 tablespoons of the butter in a 12 inch skillet over medium heat. Add the mushrooms and thyme, season with salt and pepper and cook for 5 to 6 minutes, until the mushrooms are tender.
Stir in the garlic and cook for about 1 minute, until fragrant. Sprinkle the flour over the mushrooms and stir for about 1 minute, until it is absorbed.
Pour in the Chardonnay and cook for about 15 seconds, stirring, until it has evaporated. Add the chicken stock and the cold milk. Bring to a boil, then lower to a simmer and cook for 5 to 7 minutes, stirring occasionally, until the sauce thickens and the raw flour taste is gone.
Taste and season with salt and pepper, remove from the heat and fold in the cooled green beans.
Grease a 9x13 inch baking dish with the remaining 1 tablespoon of butter, spoon in the bean mixture and bake for 25 to 28 minutes, until hot and bubbling.
While the casserole bakes, fry the shallots. Heat the oil in a Dutch oven or heavy pot to 350 F. In a large bowl whisk the flour, paprika, cayenne and 1/2 teaspoon of salt. Put the buttermilk in a second bowl.
Work in batches. Separate the shallots into rings, toss them in the buttermilk and drain them in a strainer so only a thin film clings. Toss them with a fork in the seasoned flour, move them to a dry strainer and shake off the excess flour.
Fry each batch in the hot oil for about 2 minutes, stirring gently so they do not clump, until golden. Lift them onto a wire rack set over a sheet pan and salt them lightly right away.
Let the casserole stand for 5 to 7 minutes after it comes out of the oven, then top with the fried shallots. The shallots can be fried a couple of hours ahead and recrisped on a sheet pan in a 325 F oven for about 10 minutes.
For Adults 21+ Only: This recipe contains wine, most of which cooks off, and is intended for guests of legal drinking age.