Very lightly toast the pine nuts and set aside.
Grind the garlic with a pinch of sea salt in a pestle and mortar (or whiz in a small food processor).
Add the pine nuts and keep bushing or pulse for a few second. Add the basil leaves gradually and pound/pulse until you get a textured paste. Stir in the Parmesan, half of the oil, then the lemon juice, if used.
Season to taste with salt & black pepper. Taste it and adjust the oil, seasoning and acidity until you are happy with the consistency and flavour.
Transfer it to a jar, seal and chill until needed (it keeps for about a week- even longer if you cover the surface with a layer of olive oil and use a properly sterilised jar). Alternatively, you can use it immediately.