Zest the lemon in peels, using a sharp knife. Try to get as little pith (the white part) as possible. In a small pot of water, add the lemon peels and bring to a boil for 5 minutes.
In a small pan, toast cashews on medium-high heat for 5 minutes. (optional, but recommended)
In a large pot, boil water and cook spaghetti until al dente, saving ½ cup of pasta water.
Once lemon peels have cooled, place them in a food processor along with cashews, parmesan, salt, and garlic and process until mixed well to make the pesto. Then slowly add olive oil until creamy. Adjust the amount of olive oil if necessary. Stir into the spaghetti while the spaghetti is still hot and add in the pasta water.
Prepare your scallops by removing the muscle on the side. It's usually a little bit whiter than the rest of the scallop and should peel off easily. Season with salt and pepper on all sides.
Heat olive oil in a large frying pan to medium-high heat. Once the oil is hot, place your scallops in the pan. Don't overcrowd the pan(this may require 2 batches). Sear scallops in the oil for about 90 seconds or until they become golden brown. Carefully flip the scallops using a butterknife or a very small spatula. Sear on the opposite side for 1 minute.
Add 2 tablespoon of butter and garlic. Use a spoon to baste the scallops in the garlic and butter mix for 1 minute. Remove the scallops from the pan and serve over spaghetti.
Notes
I always suggest using a butter knife to flip scallops because most people don't have a small enough fish spatula to do this. The butter knife will delicately get under the scallop while you hold your finger on top. Flip the scallop over without ripping it off the pan.
I listed a ½ cup of olive oil, but adjust as necessary when processing the pesto to arrive at a smooth and runny texture.