Place the pastry dough on a baking tray (approx. 28 cm diameter) lined with baking paper, prick the base with a fork.
Finely chop the shallots and halve or quarter the mushrooms, depending on size. Heat the butter in a large pan. Sauté the shallots and mushrooms for approx. 5 mins. Season, continue to cook until all of the liquid has evaporated, allow to cool slightly and spread on top of the pastry base.
To make the sauce, mix together the milk, eggs and Gruyère. Crush the garlic into the mixture and season.
Bake for approx. 35 mins. on the bottom shelf of an oven preheated to 200°C. Remove from the oven, allow to cool slightly and serve warm.