Put a saucepan of water on to boil. Slice the onion and garlic. Put the pasta in the boiling water for 10mins until al dente.
Heat the oil in a frying pan over a medium heat and grate the courgette. Add the onion and garlic to the heated oil for a 2 mins then add the courgette and cook for 5 mins stirring frequently.
Add the pine nuts and cook for another minute. Cut into quarter the lemon and squeeze onto the courgette through a sieve. Remove from the heat.
Drain the pasta and put the pasta and courgette mix into a bowl. Toss together so the pasta is coated evenly, drizzle with oil and add salt, pepper and basil leaves, serve, enjoy.