Preheat oven to 180C/350F. In a large bowl cream butter, sugar, cocoa powder and salt with an electric mixer until light and fluffy, add in an egg, vanilla and mix well.
Melt the chocolate in a double boiler or in a microwave in a few 30 second spurts as it burns very quickly. Check after each time, stir and put it back in the microwave for 30 seconds longer until the chocolate is runny.
Beat in the melted chocolate into the mixture until combined, then add the flour and mix until dough forms.
Form cookies by scooping little pieces of dough with a spoon or a small cookie scoop and rolling them in your hands into a ball. Then roll each ball in finely chopped pistachios. (I fine it easier to do if pistachios are in a small bowl.)
Place on a parchment lined cookie sheet and make an indentation in the centre of each ball with your thumb or a teaspoon. (I prefer using a teaspoon.) Bake for 10 minutes, then take the cookies out of the oven and check if the thumbprints on your cookies have become too shallow. If that is the case, gently push on them with a teaspoon and fill with the jam, put back in the oven and bake for 8-10 minutes longer.
Take the cookies out of the oven and carefully transfer them to a wire rack to cool. Repeat the process until all dough is gone.