Vending machine motor and switch circuit
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Partial solution.

Since you say that SW1 is open in the home position it appears to be a 'park' switch, rather like a car window wiper motor. A short pulse on SW2 will get the motor running through D2, SW1 will close and maintain current through D1 until the motor reaches the home position. SW1 will then open and the motor will stop.

I'll think about the diode on pin 6 for a bit. Can you think of any reason why the motor might need to run in reverse?