Preheat the oven to 180 C / Gas 4. Lightly grease or line a rectangular baking tray.
Mix the sugar, ground almonds and 4 eggs in a bowl.
Add the melted butter, speculoos spread (if using), flour and custard to make a paste.
Trim one of the puff pastry sheets and set on baking tray. Spred over the paste, leaving a 2cm border. Brush the edges of the puff pastry sheet with water and then cover with the second puff pastry sheet. Trim and seal the pastry by crimping the edges.
Brush over egg yolk and bake for 30 to 35 minutes until golden brown.