In a large bowl, rub the flour and butter together gently until the pieces of butter are about the size of peas. Stir in the sugar.
Crack in the egg and roughly mix. Add enough milk, starting with one tablespoon, to bring the mixture together into a cohesive dough. Turn out onto a very lightly floured work surface and gently fold the dough over onto itself a few times until smooth - take care not to overwork. Wrap in cling film or greaseproof paper and refrigerate for at least 30 minutes.
For the pistachio frangipane
Using a stand mixer if you have one (if not, a hand mixer or a good old wooden spoon will suffice) beat the butter until soft. Add the sugar and beat until light and fluffy.
Add in 1 egg and the vanilla extract and beat well, followed by a tablespoon of flour. Add the remaining egg, beat well and then add the remainder of the flour. Beat again.
Place the shelled pistachios into the bowl of a food processor. Process the nuts until they are finely ground, the same texture as ground almonds, but take care not to overprocess as this will make them dense and oily. In my processor this took 30-40 seconds. Check their progress every few seconds.
Fold the freshly ground pistachios into the creamed butter, sugar and egg mixture. Keep in the fridge until ready to use.
When ready to assemble, preheat oven to 180ºC/350ºF. Roll out the chilled pastry to 2-3mm thick. Cut out rounds using a 2 1/2" cutter and press into a shallow bun tin. You may need to press the pastry up the sides a little - just be careful not to stretch it too much). Rest in the fridge for at least 5 minutes.
Place 1/2 teaspoon of jam into each pastry case and add a heaped teaspoon of frangipane on top. Spread the frangipane out to cover the jam.
Bake for 15 minutes until golden brown. Leave in the tin for 5 minutes before transferring to a cooling rack.
These are also really good when topped with chocolate ganache. And, saying that, I bet they'd be divine if you filled them with chocolate spread instead of the jam, too!