You were not "under duress" - no one forced you to steal.

I would not try the insanity thing, as someone mentioned. You were in the right frame of mind to get yourself to this store.

The Civil Demand that you paid on the spot is separate from the Criminal Charges you will be facing in court.

You really need to get a lawyer. If you can't afford one - go to your court date, plead "Not Guilty" and ask for a Public Defender.