Heat your oven. Set your oven to 400°F (200°C fan) and lightly grease your mini muffin pan.
Cook the bacon. If you're using it, cook your bacon (for the filling and the garnish) in a pan until super crispy. You can also air fry your bacon - I find 6 minutes at 400°F (200°C) works well to make it lovely and crispy. Once cooked, finely chop it.
Make the pesto ricotta filling. In a bowl, mix your ricotta, 4 tablespoons of pesto, three-quarters of the chopped bacon, and a good grind of black pepper. Taste, then add a little salt if it needs it (this will depend on how salty your pesto is).
Prepare the pastry. Roll out your pastry onto a wooden board, then slice it into small squares (roughly 2 to 2.5 inches). I like to cut a test square first, to make sure it fits in my mini muffin pan. Gently press the puff pastry squares into your prepared pan.
Fill the cups. Spoon a heaped teaspoon of the filling into your pastry cups, then brush the edges with the egg wash.
Bake the cups. Transfer the pan to the oven and bake for 20 minutes - I like to check after 10 minutes and rotate the pan if one side is browning more quickly than the other. Once the cups look gorgeously golden and are beginning to brown on top, remove them from the oven.
Garnish and serve. Carefully remove the cups from the pan (they should pop out easily), then transfer to a serving platter. Sprinkle with the crushed pistachios, grated Parmesan, chives, and extra crispy bacon if you're using it. Serve while hot, warm, or at room temperature.