Soak the shallots. Soak the sliced shallots in buttermilk for at least 10 minutes.
Prep the flour and the oil. Meanwhile, in a shallow dish, combine the flour and salt. In a large pan heat vegetable oil over medium heat to 375 F. To test if your oil is ready for frying, dip the end of a chopstick or a wooden spoon. If the oil bubbles around the handle, it's ready.
Fry the onions. Dredge the buttermilk-soaked onions in flour until well coated, shaking off any excess, and transfer to a baking sheet or plate. Fry in batches until golden brown. Remove them from the oil with a slotted spoon to a paper towel-lined plate and sprinkle with salt.
Blanch the green beans. Cut the green beans into 2-inch pieces. Blanch the green beans in a pot of boiling water for 5 minutes or until tender. Immediately transfer them to a bowl of ice water to stop them from cooking. Once cool, remove and set aside.
Cook the bacon. In a large dutch oven or pot over medium heat, cook the bacon until crispy. Transfer to a paper towel-lined plate and set aside.
Cook the veggies. Add the mushrooms, onion, and thyme to the pan and cook until the onions are translucent, about 8-10 minutes. Add the garlic and cook until fragrant, about 1 minute.
Simmer the sauce. Add the bacon back to the pan and add the flour. Cook for 1 minute. Then stir in the chicken broth, heavy cream, salt, and pepper, and simmer for 2-3 minutes, or until thickened.
Stir in the cheese. Turn the heat off and stir in the cheese a handful at a time. Toss the green beans in the sauce and pour it into your baking pan. Sprinkle with extra cheese if you want it extra cheesy!
Bake at 350 F/180 C for 20-25 minutes, until the sauce is bubbly. Top with the homemade fried onions and serve warm!
Video
Notes
To make ahead: After the green bean casserole is in the pan, cover the top with plastic wrap and refrigerate for up to 3 days. Leave the onions off the top to keep them from getting soggy. Bake until hot and bubbly!To freeze: Yes, we recommend only freezing it for up to 2 weeks for best results.To store: Store leftovers in the fridge in an airtight container for 4-5 days.Make a double batch to serve a crowd. You can easily double the recipe and bake it in a 9x13 baking pan or larger casserole pan to feed a crowd.Topping variations: Crushed potato chips, ritz crackers, croutons, or sliced almonds.Cheese variations: Parmesan, Swiss, cheddar, asiago, or Gruyere.