Legal history
Originally, shoplifting was not a standalone crime but simply burglary and thus a felony in California. Then, Proposition 47 of 2014 did alter the criminal code slightly. The wording of the proposition was:
Shoplifting. The proposition added Penal Code section 459.5 to create a new misdemeanor offense called "shoplifting," punishable by up to 6 months in county jail. Shoplifting would be defined as "entering a commercial establishment with intent to commit larceny while that establishment is open during regular business hours" where the value of the property does not exceed $950. Any other entry into a commercial establishment with intent to commit larceny is burglary. Any act of shoplifting as defined above must be charged as shoplifting. No person charged with shoplifting may also be charged with burglary or theft of the same property.
Legal text
The current text of California Penal Code § 459.5 is:
CHAPTER 2. Burglary [458 - 464] ( Heading of Chapter 2 amended by Stats. 1984, Ch. 193, Sec. 99. )
459.5.
(a) Notwithstanding Section 459, shoplifting is defined as entering a commercial establishment with intent to commit larceny while that establishment is open during regular business hours, where the value of the property that is taken or intended to be taken does not exceed nine hundred fifty dollars ($950). Any other entry into a commercial establishment with intent to commit larceny is burglary. Shoplifting shall be punished as a misdemeanor, except that a person with one or more prior convictions for an offense specified in clause (iv) of subparagraph (C) of paragraph (2) of subdivision (e) of Section 667 or for an offense requiring registration pursuant to subdivision (c) of Section 290 may be punished pursuant to subdivision (h) of Section 1170.
(b) Any act of shoplifting as defined in subdivision (a) shall be charged as shoplifting. No person who is charged with shoplifting may also be charged with burglary or theft of the same property.
(Added November 4, 2014, by initiative Proposition 47, Sec. 5.)
Conclusion
Shoplifting in San Francisco is illegal, however stealing less than 950 USD of value during business hours is only punishable as a misdemeanor for the first offense only. Stealing after business hours, or more than 950 USD is burglary and automatically a felony. If you have previously been found guilty of a felony, you can not be punished for a normal misdemeanor but are punished more strictly: § 667(e)(2)(C)(iv) doubles the incarceration for convicted felons of specific types, § 290(c) demands sex offenders to register, and § 1170(h) increases incarceration for convicted felons of specific types.