Put pistachios in food processor and blend to a chunky powder.
Heat olive oil in a large skillet, add onion, salt, and pepper, and cook until the onion starts to soften.
Add pistachios and stir to blend together.
Add 1/2 teaspoon hot red pepper flakes.
Lower heat, and add heavy cream a little at a time. Keep stirring until everything is blended. Cook for a couple of minutes until you see the cream start to change.
Add al dente pasta and toss to combine. Add a little reserved pasta water if needed.
Serve sprinkled with parmesan or Romano cheese.