Prepare the Cake:
Preheat your oven according to the cake mix instructions.
Grease a 9x13-inch baking dish.
Prepare the yellow cake mix according to the package directions and pour it into the baking dish.
Bake the Cake:
Bake as directed on the box.
Remove from the oven and immediately poke holes all over the cake using the handle of a wooden spoon.
Add the Pineapple:
While the cake is still warm, pour the undrained crushed pineapple evenly over the top, ensuring the juice seeps into the holes.
Prepare the Pudding Layer:
In a medium bowl, whisk together the pudding mix and cold milk until it thickens.
Spread the pudding mixture evenly over the cooled cake.
Add the Whipped Topping:
Gently spread the whipped topping over the pudding layer.
Finish with Toppings:
Sprinkle shredded coconut and chopped nuts over the top for added texture and flavor, if desired.
Chill and Serve:
Cover the cake and refrigerate for at least 2 hours before serving.
Slice into squares and serve chilled.