Combine the beans, basil, garlic, olive oil, and lemon juice in a food processor. Process until basil is finely chopped and the dip is almost smooth. Season with salt and pepper to taste. If you're using this as a dip, you can top it with toasted pine nuts or fresh basil leaves before serving.