Toast the walnuts in a dry skillet over medium heat for 2 to 3 minutes, until fragrant, then let them cool slightly.
Combine the basil, walnuts, and garlic in a food processor and pulse until finely chopped.
With the processor running, slowly stream in the olive oil until the mixture is smooth.
Add the Parmesan cheese and lemon juice, and pulse to combine. Season with salt and pepper to taste.
Store in an airtight container in the refrigerator for up to five days.