Goals from Dani Lopez, Peter Vincenti and a Danny Rose penalty had Aldershot 3-1 up at half-time and although Ashley Grimes added to his first-half strike after the break for Rochdale the home side added a fourth through Craig Reid.
Aldershot opened the scoring in the seventh minute when Lopez headed home Rose's free-kick home from close range.
Rochdale drew level just five minutes later through Grimes' low strike, but the Shots were back in front shortly after as Vincenti turned Danny Hylton's cross home.
The hosts doubled their lead on the stroke of half-time as Rhys Bennett fouled Aaron Morris in the penalty area and Rose converted the spot-kick.
Grimes got a goal back for the visitors on the hour as he volleyed home from close range but substitute Reid headed a fourth at the death for Aldershot, who ended the game with ten men after captain Ben Herd was shown a straight red card.