Melt butter in a saucepan over a gentle heat and add the onion and garlic. Cooked slowly for 10 minutes to soften the onion but take care not to brown it.
In an oven proof dish (approximately 20cm square), place a layer of sliced potatoes, followed by seasoning and then a layer of the onion and garlic mixture. Repeat this process a further twice, then finally finish with a layer of sliced potatoes.
Pour over the stock and place in a preheated oven at 180CFan for 1 hour or until the potatoes are cooked and a knife slides through the layers. Remove from the oven and leave to stand for 5 minutes before serving.