You shouldn't heat the pesto itself. Heating the pesto will change the color, texture and taste of the fresh basil. Cook the pasta and drain it then toss with the pesto. The heat from the pasta will warm the pesto. Reserve some pasta cooking water to stir into the pesto if it is too thick.