Preheat oven to 180°C. Cut the pastry to make 8 equal rectangles, then chill until you’re ready to use it.
Gently heat the butter in a frypan. Add the French shallots along with a pinch of salt and cook over medium-low heat for 1 minute. Add the pear and bacon and cook for a further 6-8 minutes or until softened and slightly caramelised. Turn off the heat and set it aside to cool.
Divide the pear and bacon mixture over four rectangles of pastry. Divide the cheese between these pastry parcels. Sprinkle some chopped almonds on top of each, then top with the remaining pieces of pastry. Use egg wash on the edges, pressing down with a fork to seal. Top with almond flakes
Brush with more beaten egg and bake for 25-30 minutes, until golden and the pastry is cooked through. Serve hot or warm with a green salad.