1. Preheat the oven to 180°C, gas mark 4.
Butter a 1.8 litre baking dish and sit it on a baking tray.
2. Put the flour, a pinch of salt, the sugar and baking powder in a bowl. Add the milk, butter, egg and vanilla and whisk together. Stir in the pineapple and pour into the baking dish.
3. Put the brown sugar, syrup and 250ml boiling water in a small saucepan and bring to the boil. Pour over the pudding (don’t be alarmed by this unusual method, it works beautifully), then bake for 40-45 minutes until golden. Set aside for 10 minutes before serving.
4. Meanwhile, put all the ingredients for the custard in a small pan and whisk together. Stir, without boiling, over a low heat for 6-8 minutes until thick enough to coat the back of a wooden spoon. Serve with the pudding.