Peel and quarter pineapple. Remove core and slice into pieces 1 cm (½ in) thick. Place in a saucepan (not aluminium), add pineapple juice and bring to the boil. Turn heat to a rapid simmer and cook until juice has almost evaporated. Leave to cool.
Preheat oven to 180°C/350°F/Gas Mark 4. Place cashew nuts in a food processor and process to a fine crumb. Add butter, icing sugar and cardamom and process 10 seconds. Add eggs, flour and rum and process to a thick paste. Spread evenly in cooked pastry shell. Lay pineapple on top, pressing in gently. Bake until nut mixture is cooked through, about 40 minutes – test with a skewer.