Preheat the oven to 170°C/fan 160°C/340°F/gas mark 3½. Place the cupcake cases into 2 × 12-hole cupcake tins. Divide the batter evenly between them and bake for 17-20 minutes, or until the cakes spring back to the touch. Don’t worry if they crack in the oven; the icing will cover any fissures. Remove and cool on a wire rack.
Meanwhile, make the icing. In a heavy-based pan, gently heat together 125 ml water, the sugar, chocolate and syrup and bring to the boil, stirring so it doesn’t catch on the bottom of the pan. Stir constantly for about 3 minutes, or until thickened. Remove from the heat and stir in the butter.
Allow to cool, then spoon over the cupcakes. If the icing becomes too thick before you have finished coating the cakes, simply reheat it very gently. Place a chilli on each cake as you apply the icing, then leave to cool completely and set.