Cook the spaghetti or other pasta in large pot of salted boiling water according to package directions or until al dente. Drain the pasta and reserve 1 cup of the cooking water.
While pasta is cooking, add the roughly chopped garlic, and finely grated parmesan cheese to a food processor and process until smooth.
Then, add in the onions and capsicum to a wok. Pulse a few times until saute. Season with salt give a squeeze of lemon juice, and whiz again until combined. Taste for seasoning and adjust to your liking.
Toss the hot noodles with the pesto in a large bowl and add reserved cooking water ¼ cup at a time or until saucy. Top with the capsicums and season with more salt and pepper if desired and garnish with more parmesan cheese.