Preheat oven to 180°C, fan 160°C, gas 4. Peel and finely slice the potatoes. Finely chop the shallots and garlic, then mix with the fresh thyme.
In a jug, mix the cream with the chicken stock. Layer the potatoes in a 1-litre ovenproof dish, sprinkling a little of the shallot mixture between each layer and pouring over the cream and stock.
Bake for 35–40 minutes until the top is golden and the potatoes tender.