1Heat the oven to 200C and grease a 20 cm baking dish with a little of the butter.
2Slice the potatoes 3 mm thick and thinly slice the onions.
3Melt the rest of the butter in a pan on medium heat and cook the onions for 8 minutes until soft and golden at the edges.
4Add the crushed garlic, cooking cream, salt and black pepper to a small pan and simmer on low for 5 minutes, stirring.
5Layer half the potatoes in the dish, then half the mushrooms and onions, and pour over a third of the cream. Repeat the layers and finish with the cream.
6Cover with foil and bake for 35 minutes, then remove the foil, scatter the cheese on top and bake 10 to 15 minutes more until the cheese is golden and a knife slides easily through the potatoes.