An artificial pacemaker would generate regular electrical impulses in the atria.
The regular electical impulses from the pacemaker are stronger than the irregular impulses from the SAN, therefore the ventricles would recieve regular electrical stimulation.
This would normalise their contraction and ensure effective cardiac output at a regular rate.