In the future, may I suggest you take pictures prior to disassembly, trust me even if you don't review them 9 out of 10 times the one time you need them they are invaluable... And free in today's digital age, them Polaroids used to get expensive...
As for helping you out you need to find the wiring diagram or service manual for your microwave and figure it out... Maybe a call to the parts supplier you obtained the replacement part from?