Preheat oven to 400 degrees F. Lightly grease a regular sized muffin pan.
In a large saute pan, melt the butter over medium heat. Add the shallots and cook until soft and translucent, about 2 minutes. Add the mushrooms and salt and pepper and saute until mushrooms are soft, about 5 minutes, stirring frequently. Set the mixture aside to cool slightly.
On a lightly floured surfaced, roll out the puff pastry till it is about doubled in size. Cut into rounds to fit inside the muffin pan (I used a 3-inch round cutter). Press the rounds into the pan.
In a medium bowl combine the rosemary, egg, parmesan cheese, and mushroom mixture. Spoon into the prepared mini tart shells. Bake until golden and bubbly, about 15-17 minutes. Let cool for a few minutes in the pan, then serve immediately.
While best served immediately, store mini tarts in an airtight container in the fridge. Reheat in a 350 degree F oven for 5-7 minutes.