Place the shelled pistachios in a food processor and pulse until they are finely chopped. Transfer them to a mixing bowl, add the milk and stir to combine.
Whisk the sugar and cornstarch together in a large saucepan. Add a small amount of the milk and whisk until smooth. Add the rest of the milk and whisk until combined.
Turn the burner to medium heat and cook the pudding for about 10 minutes or until it's thickened, whisking often. Don't let it boil - it's better to slowly warm the mixture until it's steaming hot. It will take a bit for the pudding to thicken - once it does, bubbles will form that can barely break the surface of the pudding. Once this happens, take the pan off the heat.
Place a strainer over a large heat-proof bowl and pour the hot pudding into the strainer. Using a spatula, press the pudding through the strainer and discard the solids (it's okay if some of the nutty bits slip through!).
Transfer the strained pudding to small bowls or cups. Cover with plastic wrap (the wrap should touch the surface of the pudding to prevent a skin from forming) and chill the pudding for a couple of hours or up to one day.
Notes
Pistachios: You can shell the pistachios yourself or buy ones that are already shelled. Just make sure to use unsalted pistachios.You can serve the pudding warm, but I think it the pistachio flavor is better after the pudding is chilled. The pudding will keep well for two days in the refrigerator.