Whisk the butter and sugar in a bowl until pale and light. Sift in the flour, rice flour and salt and work the ingredients together to form a soft dough. Shape the dough into a flat disc, wrap in clingfilm and chill for 30 minutes.
Grease and line a 20 cm (8 inch) square baking tin with baking paper, allowing the paper to overhang the sides of the tin. Roll out the dough on a lightly floured surface and press into the prepared tin, smoothing it as flat as possible. Bake in a preheated oven, 190°C (375°F), Gas Mark 5, for 20–25 minutes until golden. Remove from the oven and leave to cool in the tin.
Heat the butter, sugar and condensed milk gently in a pan, stirring constantly until the butter has melted and the sugar has completely dissolved. Increase the heat and bring to the boil, whisking constantly for up to 5 minutes until the mixture thickens. Remove from the heat, stir in the pine nuts and pour the caramel mixture over the shortbread layer. Leave until set. Chill for 2 hours until firm.
Melt the chocolate in a bowl over a pan of simmering water (see