When you cook the pasta, make sure to boil it for just a few minutes less than the package instructions suggest. This will help the pasta maintain its shape and texture when it bakes in the oven.