Put half of the sugar and cornflour in a saucepan over low heat. Add the milk and vanilla essence. Bring to the boil stirring constantly.
In a large bowl whisk 2 egg yolks with the remaining sugar. Pour in a little bit of the hot milk mixture then pour everything back into the saucepan and cook 3 minutes after the mixture starts to boil stirring constantly.
Remove from heat, pour the mixture into a bowl and let cool for 10 minutes. Once the mixture has cooled down add the butter whisking briskly. Set aside.
In another bowl sift together the almond meal, cornflour and icing sugar. Add the softened butter then egg stirring constantly with a spatula. Stir in the milk mixture then almond-mixture and mix until smooth.
Preheat oven to 190 degrees C.
Line a pie dish with the pastry sheet then pour in the creamy mixture and smooth it with a spatula. Place the sliced pears in a circle on the mixture.