Thaw puff pastry.
Peel shallots and garlic, coarsely chop garlic. Rinse rosemary, shake dry, pluck off leaves and chop finely. Roll out pastry on a floured surface to fit tart pan. Heat up honey in a tart pan, add shallots, garlic and rosemary and caramelize for 2-3 minutes. Remove pan from heat, cover shallots with pastry and press pastry into the edges of the pan. Brush with beaten egg yolk and bake in preheated oven at 200°C (approximately 400°F) for about 30-35 minutes or until golden. Remove from oven and gently invert onto plate. Serve immediately.