Bring a large pot of salted water to the boil. Add the broccoli and cook until tender, about 7-10 minutes. Drain and using the same pot boil another lot of salted water. This time add the spaghetti and cook according to the packet instructions.
While the pasta is cooking make the pesto. Put the broccoli in a blender and blitz until it's chopped. Don't worry about it being smooth at this stage. Add the olive oil, pine nuts, garlic and basil and blitz again. Now it should be pretty smooth so add the parmesan, lemon juice and a sprinkling of salt and pepper. Blend one final time until you've reached your preferred texture.
Stir the pesto through the drained pasta and top with an extra shaving of parmesan.