Preheat the oven to 180 C / Gas 6. Line a baking tray with a silicone sheet or with greaseproof paper.
In a bowl stir together plain flour, baking powder, cocoa powder and caster sugar. Beat in the butter, then the egg, then the milk. Place tablespoonfuls of the mixture onto the prepared baking sheet.
Bake in the preheated oven until a skewer inserted near the centre comes out clean, no more than 15 minutes. Remove the pies from the oven and let them cool.
Meanwhile, mash the raspberries and pass them through a fine sieve. Mix the raspberry juice with the icing sugar, then beat together with the cream cheese.
Spread the flat side of one of the pies with the raspberry sauce, then place a second pie on top to make a sandwich.
To decorate the whoopie pies, mix a little water with some icing sugar to make an icing the consistency of thick cream. Place the icing in a pastry bag with a tip and trace some decorative lines on the top of the pies.