Very lightly grease a 2lb loaf tin and line with baking paper. Reserve a few raspberries for decoration.
Put the remaining raspberries in a bowl with the chopped madeleines and sprinkle over the Cointreau.
Spoon about one third of the ice cream into the lined tin. Press down and level with a fork.
Scatter over half the fruit and chopped madeleine mix with half the pistachio nuts and basil.
Add a second layer of ice-cream followed by the remaining fruit and madeleines. Top with the remaining ice-cream, pressing everything down well with a fork or the back of a spoon.
Cover with clingfilm and freeze overnight.
To serve, turn the loaf tin upside down on a serving plate. Wipe a hot cloth over the sides of the terrine and lift off the tin. Peel away the lining paper.
Scatter the reserved raspberries over the terrine with extra nuts and small basil leaves. Serve immediately, thickly sliced.
The terrine can be made up to a week ahead.
Use fresh orange juice instead of alcohol for a more family-friendly dessert.