Boil a large pot of water, add the green beans to the boiling water and blanch for 2 minutes (or 6-8 minutes if you like them softer). Drain in a colander and rinse under cold water or an ice bath to stop them from cooking.
Meanwhile make the topping, heat a medium-sized skillet over medium heat. Add the shallots and sauté about 3-5 minutes, stirring occasionally until golden brown.
Reduce heat to medium-low, add breadcrumbs, grated cheese and thyme; sauté until golden brown, about 5-6 minutes, stirring frequently, careful not to burn.
Preheat the oven to 375F. Lightly spray a 13 x 9 inch baking dish.
Heat oil in a large sauté pan over medium-high heat. Add shallots and sauté 1 to 2 minutes. Add mushrooms, season with salt and pepper and sauté 6-8 minutes, stirring occasionally.
Sprinkle flour over the mushrooms, stir constantly for about a minute, then slowly add chicken stock, then milk.
Bring to a low boil, and cook stirring occasionally until thickened, about 3 minutes. Stir in grated cheese.
Add blanched green beans and mix well, season with salt and pepper as needed; pour into prepared baking dish.
Top with toasted breadcrumbs and bake about 30 minutes.