Spittal scored an even better effort moments later, lashing the ball into the top corner from the edge of the box to double the capital club's advantage.
Hearts could have been further ahead at break, had it not been for Dundee goalkeeper Trevor Carson, who produced several excellent saves.
The hosts' only chance of the first half saw Simon Murray head straight at Craig Gordon from a few yards out.
It was game over early in the second half when Kabangu got on the end of Shankland's sumptuous defence-splitting pass, before cooly slotting the ball under Carson to make it 3-0.
Dundee's abject afternoon was summed up on 66 minutes when Carson dropped the ball whne trying to claim a cross and Musa Drammeh had the easiest of tasks to prod the ball home from close range.
Kabangu got his second, and Hearts' fifth, with a stunning volley from 16 yards, before Kenneth Vargas completed the rout in injury time with a drilled low shot.