To make the pastry, sift the flour into a large bowl, add the butter and rub together with your fingertips until the texture resembles breadcrumbs. Now add the icing sugar and mix through. Whisk the egg yolks, add to the mixture and combine, using a round-bladed knife in a cutting motion until it forms a pastry ball. Wrap in cling film and chill in the fridge for 30 minutes. Lightly dust a cool surface with icing sugar, roll the pastry out to fit just inside the flan ring, then carefully drape the pastry over the rolling pin and unroll it into the flan ring on the baking sheet. Using your fingers, mould the pastry into the ring to form the base of the tart, then chill for a further 30 minutes.
For the filling, peel, core and halve the pears and arrange round-side up in the pastry case. Cream together the butter and sugar. Add the egg and beat in, then mix in the ground almonds. Sift the flour, baking powder and cocoa, and fold in with the milk. Spoon into the pastry case and smooth the top. Place in the oven and