Burglary is entering a building with the intent to steal or commit a felony inside. Many people falsely believe it pertains to just committing a theft, but it applies to all thefts and felonies and targets the "specific intent in the entering of the structure". You can be charged with both the burglary and the underlying crime that occurred in the building if you intended to commit that crime as you entered the structure. It could be assault with a deadly weapon, rape, felony vandalism or any felony or theft regardless of value.
A burglary can be charged with a shoplifting even if the value of the theft is $950 or less and is only a petty theft. Burglary refers to the "mental intent" when you entered the store, not the value of the property taken. Burglary requires "entering" the store with the intent to steal, not deciding to steal after you are already in the store. It is a felony punishable by up to a 3 years prison. That charge is a "wobbler" and could also be charged as a misdemeanor depending on a number of factors. The police officer does not have that discretion, only the District Attorney when they review the case and your background for filing.
Burglary is different than theft. Theft is either grand theft if over $ 950 in value or petty theft if under. Grand theft is a felony but can be reduced to a misdemeanor, petty theft is always a misdemeanor unless there are prior theft offenses. Burglary is the entry in to a building with the intent to commit any theft, grand or petty, or any other felony. It is the "entry with intent" which is the crime and is always a felony but can be reduced to a misdemeanor at some point, as long as the building entered was a commercial building and not a residence. It is considered 2nd degree.