Make a shortcrust pastry from the flour, sugar, baking powder, salt, 1 egg and the margarine.
Roll out the dough in a springform pan (28 cm) and pull up the edge about 3 cm. Preheat the oven to 175 ° C.
Peel and core the apples and cut into pieces about 1 ½ cm in size. Spread the apple pieces on the shortcrust pastry and sprinkle with a little cinnamon.
Mix the custard powder with a little milk and the sugar. Put the rest of the milk in a saucepan, bring to the boil and add the mixed pudding powder. Bring the milk to the boil again, then take it off the hob, let it cool down a little and stir in the 2 eggs.
Spread the pudding mixture over the apples and smooth it out. Scatter the flaked almonds on top.
Bake the apple pie in the hot oven on the middle rack for 45 to 50 minutes.
Tip: With circulating air the temperature of 160 ° C is also sufficient