Preheat oven to 425 degrees
Layer potatoes into a 9 x 13 ceramic baking dish
In a large saucepan melt the butter over medium heat.
When the butter is melted add the shallots and cook for 3-4 minutes or until they are fragrant and translucent.
Add the garlic and thyme into the shallots and cook for another 1-2 minutes or until the garlic is fragrant.
Stir in 1/4 cup chicken stock and give it a stir to make sure none of the aromatics are sticking to the pan.
Stir in the milk and cook until hot and steamy. Make sure the milk does not curdle.
Stir in the cheese. Cook until the cheese is melted.
Pour the sauce over the potatoes. Using a spoon or your hands, give the potatoes a couple stirs until the sauce is within all the layers.
Cover with foil and bake for 45 minutes.
Remove foil and bake for another 15-20 or until it bubbles and is browned on top.