1) Preheat the oven to 180°C/Gas 4. Grease a 22cmx32cmx5cm deep cake tin. Line it with greaseproof paper, then grease and flour the paper.
2) In the bowl of an electric mixer fitted with a paddle attachment, cream the butter and sugar on a medium speed until light yellow, about two minutes.
3) With the mixer on low speed, add the vanilla, eggs and peanut butter and mix until all the ingredients are combined.
4) In a small bowl, sift together the flour, baking powder and salt. With the mixer on low speed, slowly add the flour mixture to the peanut butter mixture. Mix just until combined.
5) Place two-thirds of the dough into the prepared cake pan and spread evenly over the bottom. Spread the jam evenly over the dough. Drop small blobs of the remaining dough evenly over the jam. Don't worry if all the jam isn't covered; the dough will spread in the oven.
6) Sprinkle the top with chopped peanuts and bake for 45 minutes, until golden brown. Cool and cut into squares.