For the dressing: In a medium bowl, combine all dressing ingredients (garlic, olive oil, lemon juice, salt, Dijon mustard and shallot) and stir with a whisk until combined. Refrigerate until ready to use.
In a large bowl, combine the pasta through tomatoes and toss to combine. Add anchovies if using and then pour dressing over salad and toss. Top pasta salad with green onions and chopped basil. Refrigerate until ready to serve.