In a saucepan over medium heat, melt the butter. Stir in garlic and cook until lightly golden, about 1 minute. Whisk in flour until mixture thickens. Add the milk and whisk until the sauce thickens, about 3 minutes. Whisk in the pesto and 1/2 cup of the cheese. Whisk until smooth. Season with salt and black pepper, to taste.