Roll out the pastry on a lightly floured surface until a little larger than a 25 cm (10 inch) tart tin. Lift the pastry over a rolling pin, drape into the tin, then press over the base and sides. Trim off excess pastry with scissors so that it stands a little above the top of the tin. Prick the base with a fork and chill for 30 minutes.
Line the tart with nonstick baking paper, add baking beans and bake in a preheated oven, 190°C (375°F), Gas Mark 5, for 15 minutes. Remove the baking paper and beans and bake for a further 5–10 minutes until the pastry is crisp and golden. Leave to cool completely. Reduce the oven temperature to 180°C (350°F), Gas Mark 4.
Beat the butter, sugar and ground almonds together until smooth, then beat in the eggs and lemon juice.
Arrange the pear slices over the pastry case and carefully spread over the almond mixture. Sprinkle with the flaked almonds and bake for 30 minutes until the topping is golden and firm to the touch. Remove from the oven and leave to cool.
Dust the tart with sifted icing sugar and serve in wedges with chocolate sauce (see below) and some vanilla ice cream.