Preheat the oven to 400 degrees and line a baking sheet with parchment paper. Unfold the puff pastry sheets on a lightly floured surface and cut each into six equal squares.
Melt the butter in a skillet over medium heat. Add the shallot and garlic and cook for two minutes until softened.
Stir in the mushrooms, thyme, salt, and pepper. Cook for six to eight minutes until the mushrooms release their liquid and turn golden. Remove the skillet from the heat.
Place the pastry squares on the baking sheet. Spoon the mushroom mixture into the center of each square and top with crumbled goat cheese.
Brush the exposed pastry edges with the beaten egg. Bake for 15 to 18 minutes until the pastry is puffed and golden.
Remove from the oven and sprinkle with chopped parsley before serving.