Malay language has a word for this - sentap. This is when they have a sudden realization that they're doing something bad and feel remorse immediately after.
Examples of use
A billionaire donates a substantial amount to building an orphanage. Someone asks this billionaire why he spends all that money, yet has done nothing for his orphaned niece. He feels this 'sentap' at the question, then adopts the niece soon after.
An award winning pharmacist has made a few millions by overcharging for patented medicine. Someone tells her that she has become rich with her methods, but has never helped the poor people who died without the medicine. She feels 'sentap' at the question, and chooses to donate a portion of her profits to the poor.
Is there an English word catches that brief shock and surprise before remorse? It's not necessarily guilt or shame. It can be something like sadness upon realizing something, which the person might have denied earlier or simply never noticed.
Realization doesn't seem to be the ideal term as it doesn't catch the remorse later on. Fridge Horror comes close, but is more suited to horror rather than remorse.