Put ¾ cup of the pistachios in a food processor and grind until fine. Chop the remaining ¼ cup of pistachios roughly and set aside for garnish.
Bring a large pot of heavily salted water to a boil. Add the pasta and cook until al dente – usually 2 minutes less than recommended on the package directions. Make sure to stir the pasta occasionally while cooking to prevent it sticking to itself.
While pasta is cooking make the sauce. In a skillet over medium heat, heat the olive oil then add the chopped onion. Cook onion until soft and translucent, about 5 minutes. Add the minced garlic, anchovy fillets, red and black peppers. Cook for 2 minutes smashing the anchovies as they cook to dissolve into the olive oil. Add the ¾ cup of ground pistachios and cook for 2 more minutes. Add the milk, turn up the heat to high and bring to a boil. Reduce heat to maintain a slight boil and cook uncovered, stirring frequently, for 10 minutes or until the sauce has thickened. There will be some extra liquid in the sauce but this is ok, it will be absorbed by the pasta. Add the ¼ cup Parmesan cheese if using. Taste the sauce and add salt if necessary. Turn off the heat.
When the pasta is finished cooking remove 2 or 3 ladles of the pasta cooking water and reserve then drain the pasta. Return the drained pasta to the hot pan it was cooked in, add the pistachio sauce and cook over medium heat for a minute or two tossing the pasta with the sauce to combine. Add some of the reserved pasta cooking liquid to the dish if the sauce seems too thick.
Serve with the reserved chopped pistachios sprinkled over and some additional Parmesan cheese if using.