The answer depends on the reaction to the crime by the resident of the home and whether any of that person’s property was actually taken by your friend. California burglary law, under Penal Code 459, requires that your intended to commit a petty theft, grand theft, or other felony once inside. It isn’t necessary for the prosecutor to prove that your friend actually committed the intended crime, only that he or she intended to do so.
Assuming your friend intended to take something once inside the home, he or she did commit what’s known as felony first degree, residential burglary. The punishment for that crime can include a term in state prison.
The legal definition of robbery is taking another person’s property by means of force or fear. If the person who shot at your friend did so because they were in fear of his or her actions (which seems likely) AND your friend actually took property from the persons home, you friend could be charged with residential—or home invasion—robbery, a very serious felony offense.