Preheat the oven to 350°F and butter an 8x8-inch baking dish.
Prepare Kraft Macaroni and Cheese following package instructions, slightly undercooking the macaroni.
Melt the butter in a large skillet over medium-high heat. Add the onion and cook, stirring often, until softened, 3 to 5 minutes. Add the ham. Cook 1 minute longer. Use hands to squeeze excess moisture from the spinach and add it to the skillet. Stir in the Kraft Macaroni and Cheese. Mix well and transfer to the baking dish. Sprinkle cheese on top and bake until warmed through and the cheese has melted, about 20 minutes.