Peel the garlic and mash it in the saucepan. Add the baked beans and cook until the sauce is thick.
Place the bread in a baking dish. Spread the baked beans on top. Cut the onions into rings and place on top. Sprinkle the cheese on top. Bake the bread in the oven at 160 ° C for about 15 minutes.