Preheat the oven to 200 degrees Celsius (392 degrees Fahrenheit).
Peel the shallots, halve them, and cut them into thin slices. Heat a pan and add butter. When the butter is melted and sizzling, add the onions. Fry them for a couple of minutes. Add balsamic vinegar and sugar and let the onions caramelize (be careful not to use too high heat) let it fry for about 8-10 minutes. Then remove the onions.
Mix crème fraîche with mustard and 100 grams of the grated cheese, and season with salt and pepper.
Place 2 slices of bread on a baking sheet lined with baking paper.
Spread the slices of bread with a thin layer of mustard, add a couple of spoonfuls of onions on each slice of bread, a good spoonful of your cheese cream, and finally sprinkle a little grated cheese on both slices of bread.
Place the last two slices of bread on top, spread with a little butter, and top with the remaining grated cheese.
Bake in the oven until the cheese is melted and the top slice is golden and delicious; about 12-14 minutes.
Serve immediately.
Enjoy.