Heat 1 tablespoon butter and oil in an oven-proof skillet over medium heat until butter is melted. Add shallot and garlic; cook and stir until shallot is wilted, about 5 minutes.
Place mushrooms, gill side up, into the skillet. Cook, flipping once, until liquid is absorbed, 2 to 3 minutes per side. Return mushrooms to gill side up.
Arrange green beans around the mushrooms. Pour in wine; simmer until absorbed, 5 to 10 minutes. Reduce heat to low; cover. Cook until mushrooms release their juices and green beans are tender, about 10 minutes.
Top mushrooms with ham slices; sprinkle evenly with Gruyère cheese. Add remaining 1 tablespoon butter to the green beans.
Bake in the preheated oven until cheese is melted and bubbly, about 5 minutes.