You do need to hire a lawyer or ask for the public defender. That said, it is not necessary that you left the store for the charge to stick. Any act of dominion or control over the store's property all do whether you walked past the cash registers or not. For commercial burglary the People will have to prove that you entered the store with the intent to commit larceny. This is a more difficult burden than is sometims thought.
Your best bet is to hire a locally experienced defense attorney. Nobody on here is going to be able to give you a competent and thorough answer without having a chance to review all of the evidence in your case. Good luck.
I agree with Mr. Kaman. (1) You need a lawyer right away if you don't already have one. (2) Where you were when apprehended is not conclusive. The relevant issue is your intent. Where you were might be a relevant fact in showing your intent or lack thereof. As Mr. Kaman points out, the burden will be on the prosecution to prove you entered the store with intent to commit larceny. The prosecution will have to prove this beyond a reasonable doubt and, as Mr. Kaman points out, that is easier said than done.
The response above is not intended as legal advice. This response does not create an attorney-client relationship. Legal questions can only be fully answered through consultation with an attorney to whom you give full and accurate details. Anything you post here is not confidential and is not protected by the attorney-client relationship. It is highly recommended that you seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting.
Hire a GOOD outside lawyer and pay him well to take it to the limit.
Curt Harrington Patent & Tax Law Attorney Certified Tax Specialist by the California Board of Legal Specialization PATENTAX.COM This communication is general information and not legal advice, and does not create an attorney-client relationship. This communication should not be relied upon as any type of legal advice. Please note that no attorney-client relationship exists between the sender and the recipient of this message in the absence of either (1) a signed fee contract and (2) remission of an agreed-upon retainer. Absent such an agreement and retainer, I am not engaged by you as an attorney, nor is any other member of my law firm.