The FTM actually means Factory Test Mode and it's a mode used by the technicians to test various phone's features and functions. It's something like NAND Dump mode on Samsung and other phones. To get out of the Factory Test Mode, plug out the battery, put it back and boot the phone normally without touching any other buttons.
To reset it, open dialer and dial: `98357#`.