Theft is considered a "crime of moral turpitude." That means that a conviction for petty theft is going to be a serious black mark on your record. I understand what it's like to be a poor student but I think it would be a mistake not to hire an attorney.
A number of people in your situation simply plead guilty and take whatever the judge gives them. This is almost always a mistake because these cases are often winnable and deals can be reached with the district attorney before trial.
My suggestion is to save up some money and contact an attorney. Keeping a theft conviction off your record is a no brainer.
San Francisco, CA 94107
You're going to need to be represented by a lawyer. If you truly cannot afford one, that's what the public defender is for. If you meet the financial qualifications, the court will appoint an attorney to represent you.
You're going to have to work closely with your attorney. The benefit of hiring one (assuming you can work out the finances) is that you will have more access to your attorney and they can spend more time with you, working out a strategy and plan to try an minimize this mistake on your future. The public defenders are strictly criminal defense attorneys, but are unfortunately overworked, so cannot devote a lot of time to any one case or one client.