1Stir 1/2 teaspoon salt into a pot of water; bring to a boil. Stir penne pasta into the boiling water and cook, stirring occasionally, until tender yet firm to the bite, about 11 minutes; drain.
2Melt butter in a large skillet over medium heat. Cook and stir ham and mushrooms in hot butter until the mushrooms are softened, 3 to 4 minutes.
3Stir flour, remaining salt, and bay leaf into the ham mixture; cook and stir until flour begins to bind butter into a paste, about 2 minutes. Stream milk into the skillet while stirring. Melt Parmesan cheese into the milk mixture; add basil and continue cooking and stirring until the milk thickens into a sauce, 2 to 3 minutes.
4Remove skillet from heat and immediately stir spinach into the sauce; add to drained pasta and stir to coat the pasta.
You can use 2 teaspoons fresh chopped basil in place of the dried, if preferred.