For the spinach-basil pesto dressing: Place the basil, spinach, oil and lemon juice in a food processor or blender, then puree until smooth. Add the pine nuts and a salt, if using, and blend again until the mixture has the consistency of a dressing. Add more oil or lemon juice as needed for your desired consistency. Set aside.
For the wax bean salad: Cut the beans into pasta-size pieces, about 1 1/2 inches long. Add 1 tablespoon of oil to a large skillet or saute pan and place over medium-high heat. Carefully add the wax beans to the hot skillet in batches, being careful not to overcrowd the skillet. Cook the beans until they've softened a little bit and charred where they've touched the pan, 3 to 5 minutes. Toss the beans with a wooden spoon and cook for another 3 to 5 minutes. Place the cooked beans in a large serving bowl. Continue cooking, adding more oil as needed, until all the beans have been sauteed.
Add half the pesto dressing, the cherry tomatoes and the shallot if using to the serving bowl and toss with the warm wax beans until combined. Add more pesto to taste and save the remainder of the dressing to serve on the side. Cover and refrigerate the salad and dressing for up to 2 days.
If wax beans aren't available at your grocery store or market, substitute green beans.
Recipe courtesy of Jessica Goldman Foung