Cut the butter into cubes and leave at room temperature to soften.
Fit the K beater to the machine.
Grease and flour the tart tin.
Add Ingredients 1 (butter, flour, salt, sugar) into the Mixer bowl.
Attach the Mixer bowl to the machine and fit the splash guard.
Mix on speed 2 for 2 minutes.
Add Ingredients 2 (egg, milk) into the Mixer bowl.
Mix on speed 2 for 1 minute.
Place the pastry on a lightly floured worksurface and knead together.
Wrap in plastic wrap.
Chill in the fridge for 30 minutes.
Transfer the pastry from the fridge to a lightly floured worksurface.
Gently knead the dough until it becomes soft and pliable.
Lift the dough and lightly flour the worksurface.
Roll out the pastry until 2 mm thick, large enough to fit in the tart tin.
Fold the pastry onto the rolling pin and gently place the pastry over the tart tin.
Lift the edge and press the pastry into the corners of the mould.
Lightly prick the base of the tart with a fork.
Pre heat the oven to 180ºC.
Take the tart tin out the fridge.
Line the tart tin with parchment paper.
Fill with baking beans.
Bake for 15 minutes at 180ºC.
Remove the baking beans.
Bake for 3 minutes at 180ºC.
Increase the oven temperature to 200ºC.
Lightly spread the tart base with Ingredients 3 (raspberry jam).
Retrieve, clean the Mixer bowl and fit the Spiral dough tool.
Add Ingredients 4 (butter, sugar) into the Mixer bowl.
Mix on speed 4 for 2 minutes.
Remove the Spiral dough tool and fit the K beater.
While the machine is running, add Ingredients 5 (eggs) into the Mixer bowl.
Mix on speed 4 for 1 minute, 30 seconds.
Add the first 3 items of Ingredients 6 (almonds, flour, lemon zest) into the Mixer bowl.
Spread the mixture evenly over the tart so that it comes three-quarters of the way up the sides.
Sprinkle the tart with the last item of Ingredients 6 (flaked almonds).
Bake for 20 minutes at 200ºC.
Leave to cool.
Add Ingredients 7 (icing sugar, water) to the small bowl.
Mix until combined.
Transfer the icing to the piping bag.
Pipe the icing over the tart once cooled.