Place the butter in a bowl, whisk in the sugar and salt using the whisk attachment on a mixer. Add the eggs and continue to beat until the mixture becomes lighter in colour. Mix in the milk. Roughly chop the chocolate, mix with the flour and baking powder, mix into the cake batter.
Place the paper cases in the muffin tin. Spoon the mixture into the prepared tin.
Approx. 25 mins. in the centre of an oven preheated to 180°C. Remove from the oven, allow to cool for approx. 10 mins., remove the cupcakes from the tin, leave to cool completely on a rack.
Cut the butter into pieces, place in a bowl. Add the icing sugar. Using the whisk on a mixer, beat for approx. 2 mins. until light and creamy. Roughly chop the pistachios. Stir in the cream cheese and pistachios. Spoon the frosting on to the cupcakes. Top with chocolate shavings.