Place a large pot of salted water on the stove and bring to a boil. Cook the pasta al dente.
In the meantime heat a large skillet with some olive oil. Bake the onion until translucent. Add the garlic and bake for a few minutes.
Now add the spinach in batches. Each time the batch has wilted add the next batch until all spinach is cooked.
Place all the spinach in the food processor and add the grated parmesan cheese and (optional) some basil leaves. Add some cooking liquid of the pasta. Puree the spinach. Taste and add pepper and salt as needed.
Drain the pasta (keeping the cooking liquid) and place back into the pan. Add the spinach sauce and stir it through. If it is too dry you add some more cooking liquid.
Serve the pasta hot with the roasted pinenuts, extra parmesan cheese and fresh basil .