Line a 12-section bun tray with paper cake cases. Beat together the butter and sugar until pale and creamy. Sift the flour, baking powder and cocoa powder into the bowl, add the milk and beat well to make a smooth paste.
Spoon the mixture into a piping bag fitted with a large star nozzle and pipe rings into the paper cases, leaving a large hole in the centre.
Bake the whirls in a preheated oven, 190°C (375°F), Gas Mark 5, for 15–20 minutes or until slightly risen. Press a hole in the centre of each one. Allow to cool in the tin.
Melt the chocolate in a heatproof bowl over a pan of gently simmering water. Spoon a little chocolate into the centre of each Viennese whirl. Allow to set slightly before serving.