Heat a small skillet over medium-high heat. Add the raw pistachios and toast until fragrant. Let them cool slightly.
In a food processor, add the pistachios, garlic, lemon juice, salt, and pepper.
Process until well combined.
Add the basil leaves.
Process until well combined.
Add in the olive oil and the Parmesan cheese.
Process again until combined and smooth.
Add more olive oil if necessary.
Bring a large pot of salted water to a boil.
Cook the pasta until al dente according to package instructions.
Reserve about 1/2 cup of pasta water, then drain.
Warm a frying pan over medium heat, then add the freshly prepared pesto.
Add the cooked pasta.
Add a splash of the reserved pasta water.
Gently toss everything together until the sauce coats the pasta evenly.
Sprinkle with chopped pistachios for extra crunch and serve immediately.