Preheat oven to 375 degrees. Bake pie shell for 10 minutes, then remove from oven and let cool. Reduce oven temperature to 350 degrees.
In a bowl, mix mayonnaise and cheese until combined. Drain tomato slices on a paper towels, sprinkling with salt.
Place a layer of tomatoes in cooled pie shell, followed by a layer of the onions. Top with a layer of mayonnaise-cheese mixture, basil leaves, salt, and pepper. Continue layering until all ingredients have been used, ending with mayonnaise-cheese mixture. Top with more basil.
Bake pie until browned, approximately 30-45 minutes. Cool slightly and serve.