Heat a non-stick skillet over medium-low heat.
Apply butter evenly to one side of each slice of sourdough bread.
Apply basil pesto to the opposite side of each slice of bread.
Place one slice of bread into the skillet, butter-side down.
Layer the mozzarella and Parmesan cheese onto the pesto-covered side.
Place the second slice of bread on top, pesto-side down and butter-side up.
Cook for approximately 4 minutes per side, monitoring for a golden brown color and ensuring the cheese reaches a fluid state.
Remove from heat and allow the sandwich to rest for 60 seconds to set the cheese before slicing.