Photo by Hector Manuel Sanchez
Add pistachios to the bowl of a food processor and process until finely ground and beginning to thicken, about 3-4 minutes. Add ¼ cup sugar and 2 tablespoons milk and pulse until a paste forms.
Combine the paste with the remaining 2 cups milk in a large saucepan and cook over medium-high heat, whisking to break up any clumps, until the mixture begins to steam. While the milk is heating, add the remaining ¼ cup sugar with the egg, yolks, cornstarch, and salt to the food processor and process until combined. With the food processor still running, slowly add ½ cup of the warm milk into the mixture to temper the eggs.
Scrape the contents of the food processor into the saucepan with the remaining warm milk mixture and cook over medium heat, stirring constantly, until the pudding starts to bubble and thicken. Remove from the heat, add the butter and vanilla, and stir until the butter is melted.