PGM-Relay or Distributor

I am getting stalls while driving my 1999 automatic Honda Civic. I do not see any lights on the dashboard but the engine stalls while driving.



I can start the ignition immediately but often it switches off when I move to drive.



I wriggled the ignition key but the motor kept on going.



Is this a PGM-Relay issue or is it the distributor.