In a large pot, cook the pasta until al dente in salted water according to the instructions on the package.
Once the pasta is cooked, drain it but set aside about 1/4 of a cup of the pasta water.
Before serving the pasta, add the pasta to a pan with the pesto and the pasta water and mix well until it gets all creamy and thick.
Cut the mozzarella di bufala in chunks and place them on top of the pasta.
Serve immediately, with some crushed chili flakes and pepper on top.