Preheat oven to 325 degrees F (165 degrees C). Grease an 8x8-inch baking dish.
To make the cake, cream the sugar and shortening together in a mixing bowl. Beat in the eggs and vanilla. Sift the flour, baking soda, cinnamon, nutmeg, and salt together in a second bowl. Gradually stir the flour mixture into the egg mixture. Fold in the apples and walnuts until evenly blended. Spoon the batter into the prepared baking dish.
Bake the cake in the preheated oven for 40 minutes.
To make the topping, place the milk, margarine, and brown sugar in a saucepan over medium-low heat. Stir to dissolve the brown sugar, and cook until the margarine melts. Remove the cake from the oven and place it on a baking sheet to prevent spillovers. Pour the topping over the cake.
Return the cake and baking sheet to the oven and bake for an additional 20 minutes, or until a tester comes out clean. Cool to room temperature before serving.