To make the pastry, measure the flour into a bowl and rub in the butter with your fingertips until the mixture resembles fine breadcrumbs. Add the water, mixing to form a soft dough.
Roll out the dough on a lightly floured work surface and use to line a 20cm/8in flan tin. Leave in the fridge to chill for 30 minutes.
Preheat the oven to 200C/400F/Gas 6 (180C fan).
Line the pastry case with foil and fill with baking beans. Bake blind for about 15 minutes, then remove the beans and foil and cook for a further five minutes to dry out the base.
For the filing, spread the base of the flan generously with raspberry jam.
Melt the butter in a pan, take off the heat and then stir in the sugar. Add ground almonds, egg and almond extract. Pour into the flan tin and sprinkle over the flaked almonds.
Bake for about 35 minutes. If the almonds seem to be browning too quickly, cover the tart loosely with foil to prevent them burning.
Meanwhile, sift the icing sugar into a bowl. Stir in cold water and transfer to a piping bag.
Once you have removed the tart from the oven, pipe the icing over the top, giving an informal zig zag effect.