Heat oven to 220C/fan 200C/gas 7. Butter 2 individual pudding basins (about 200ml capacity), then dust generously with cocoa powder. Melt the chocolate with the butter in a bowl over simmering water or in a microwave and stir until smooth. Gradually stir in the egg, then flour, nuts, sugar and a pinch of salt, and beat gently until everything is combined, but still runny.
Divide the mixture between the pudding basins. These can now be chilled for up to a day ahead. Bake for 15 mins (or 18 mins if chilled). Turn out onto small plates and serve with ice cream. Fondants should be cooked on the outside and molten in the middle.