First make the cherry confiture, put the cherry puree in a saucepan and bring it to the boil.
Mix the pectin with the sugar and add it to the puree, cook until the mixture reaches 104C. Add the lemon juice and cook for a few more minutes. Pour the jam into a bowl and leave it to cool.
Grease and line the base of a 20cm square cake tin and preheat the oven to 160C fan/180C/Gas 4.
To make the pistachio cakes, combine the butter and sugar in the bowl of a stand mixer and beat until light and fluffy.
Add the eggs one at a time, beating between the addition of each egg. The mixture will become sloppy, but don't worry. Add the pistachios, flour and baking powder and beat until fully combined.
Pour the batter into the prepared tin and bake for 35mins or until a skewer comes out clean. Leave to cool in the tin.
Make the icing by whisking the butter in a mixer, or with an electric whisk, until very pale and fluffy. Add the icing sugar and vanilla extract and whisk for a couple of minutes, then add the cream cheese and whisk briefly until smooth.
Spread the cooled cake with a layer of cherry confiture and then top with a layer of the cream cheese icing. Trim the cake and cut it into 8 portions.
You can leave the cakes as they are, or top them with cherries or pistachios.