If you're making your own pesto (which I strongly recommend...
here's my recipe), throw the basil, olive oil, garlic, and most of the pine nuts, cheese, and salt into a small food processor. Blend until it's the consistency you want, adding more olive oil if necessary. Taste and adjust as needed...I often need to add a bit more garlic and more salt.