Begin by making the gratin sauce. In a small pan place the butter and melt. Over medium heat add the flour and stir to combine, approximately one minute. Slowly whisk in the milk and stir until thickened. Add cheese and when melted remove pan from heat. Add salt and pepper to taste.
Add the olive oil to a frying pan and heat. Add shallots and saute until slightly brown and caramelized. Remove from the pan and set aside. Place bacon in same skillet and cook through but do not let bacon get crispy. Remove from pan and cut into one inch pieces.
Grease a gratin dish or shallow baking dish and add one half of the sliced potatoes. Sprinkle the shallots over the potatoes and then add the remaining potato slices. Pour the gratin sauce over the potatoes and spoon into visible cracks and crevices. Top with parmesan cheese and bacon. Bake for 40 minutes in a preheated 350 degree oven. Serve immediately.