Preheat the oven to 375 degrees.
Peel the potatoes then use a mandolin or sharp knife for a thin slice about to ΒΌ inches thick. Finely chop the onions.
Spray the bottoms and sides of an 8 x 8 baking dish with non-stick cooking spray. Alternate the layers of potatoes, onions, flour, salt and pepper. Start with potatoes first and end it with flour mixture on top. You should have 3 layers. *See recipe notes
Top it with cubed butter and heat the milk until just before boiling.
Pour the milk over the layers in the baking dish and top it with shredded cheese.
Bake covered until the potatoes are fork tender. (approx 50 minutes) Uncover and bake until the cheese bubbles and browns. (approx 15 minutes)
Broil for 2 minutes to get a nice golden brown top. Remove the dish from the oven, and let it stand for 15 - 20 minutes or until the sauce thickens.