While basil stems are edible and contain some flavour, they are generally not used as the primary ingredient in pesto. The stems can be tough and fibrous, which may result in a less desirable texture. It is best to use just the tender basil leaves.