Heat oven to 200C/180C fan/gas 6. Tip the cream cheese and pesto into a bowl and mix well.
Unroll the pastry on a lightly floured surface and cut in half lengthways. Spread the pesto mix over one half, pop the other piece of pastry on top to create a sandwich, then cut in half lengthways to create 2 long rectangles. Divide each rectangle into short strips, about 1cm thick. Twist each pastry strip and place on a baking tray lined with parchment.
Brush with egg and bake for 20-25 mins until risen and golden brown.