Preheat oven to 350 degrees F. Butter a 9 x 9-inch baking dish.
In a small mixing bowl, combine all ingredients for topping and set aside.
Heat oil in a small skillet, add shallots and cook until tender, about 2 minutes. Add mushrooms and continue to cook until all moisture evaporates. Add flour and continue to cook for 1 minute. Pour in milk and stir until mixture is thick. Add cream cheese, salt and pepper and mix until smooth. Fold in cheddar cheese, add green beans and pour all into prepared baking dish.
Sprinkle topping mixture over beans and bake for 20 to 25 minutes or until heated thoroughly. Serve.