How to Make It
In a medium saucepan, heat 1/2 inch of canola oil until shimmering. In a bowl, toss the shallots with the rice flour. In four batches, fry the shallots, stirring gently, until golden, about 2 minutes. Using a slotted spoon, transfer the shallots to a paper towel–lined plate.
Preheat the oven to 375°. In a large pot of salted boiling water, blanch the broccoli until just crisp-tender, 2 to 3 minutes. Drain and pat dry. Transfer to a large ceramic baking dish.
In a large skillet, melt 2 tablespoons of the butter in the oil and cook over moderately high heat, stirring, until the butter turns golden, 2 minutes. Add the mushrooms, season with salt and pepper and cook over moderately high heat until browned, 8 minutes. Add the garlic and cook for 1 minute. Scrape the mushrooms into the baking dish. Add the cheese and toss. Spread the vegetables in an even layer and scatter the remaining 4 tablespoons of butter on top.
Bake the casserole for about 15 minutes, until the cheese is just melted. Sprinkle the crispy shallots on top and bake for 15 minutes longer, until bubbling and the broccoli is hot. Let stand for 5 minutes before serving.