Preheat oven to 200°C and place a baking tray inside.
Melt the chocolate in a heatproof bowl over simmering water until smooth.
Beat butter, ground almonds, sugar, flour, and eggs until smooth.
Roll the pastry on a floured surface to 3mm thickness.
Line a 26cm flan tin with pastry and prick the base.
Spread the almond mixture into the case and marble with melted chocolate.
Toss cored and quartered pears in lemon juice.
Arrange pears in the batter and bake for 30 minutes.
Scatter flaked almonds over the tart.
Reduce oven to 180°C and bake for 25-30 minutes until firm.
Cool for 10 minutes then dust with icing sugar.