Preheat the oven to 180C/160C (fan-assisted) and line a 20cm square tin with baking paper.
Microwave the butter until liquidised, add caster sugar and cocoa powder, heat in the microwave until sugar dissolves.
Add vanilla, eggs, and flour to the mixture, mix well.
Pour the batter into the prepared tin and bake for 25-30 minutes.
Remove from the oven when the sides have shrunk but the centre is still gooey.
