This error means that the door lock didn't engage properly. This could be a wiring problem or a problem with the switch. First disconnect the range from power and check the wiring and switches from the control to the switch and back. If the door was locked when the F5E2 error was observed, then replace the door switch.
If the door was not locked, then check the door switch and the latch switch. Replace the bad switch.
The rear door switch is part W10107830, https://www.partstore.com/Part/Maytag/Maytag/MER7765WW/Whirlpool/Whirlpool/W10107830/New.aspx
. A useful parts diagram is here: http://www.searspartsdirect.com/model-part/mer7775ww0/3048/0124111/W0908230/00003.html
After replacing the bad part, reconnect the power to the range. Press and hold any key for a minute to clear the F5 code from the memory. Then press Cancel to clear the next code you see. Check if the range works.
I hope this helps.