Preheat your oven to 180°C and place the cupcake cases in a muffin tray.
Cream the castor sugar and butter together until combined and pale. Add the lemon zest and egg and mix everything together.
Use a food processor to grind the pistachios finely. Sift the flour, baking powder and salt into the sugar mixture, add the chopped pistachios and mix. Add the lemon juice and milk and mix until just combined.
Divide the mixture between the cupcake cases and pop the tray in the oven. Bake for 15 minutes or until an inserted skewer comes out clean. Allow to cool.
To make the icing: Place the butter in a bowl and beat until soft and pale. Sift in the icing sugar. Add the vanilla extract and lemon juice and mix, scraping down the sides of the bowl, until the mixture comes together. Add enough milk to give the icing a spreading consistency.
Pipe or spread the icing onto the cold cupcakes. Chop the pistachios up finely and sprinkle over the cupcakes.