You Do not Say Where this Was, but ....
Your tag says it is a question about the law in the United States. Your friend told you that this was not some recommendation of the best way to handle a school shooter, or some local school-district policy that she might be disciplined under. In your telling, she believed that she would be criminally prosecuted for murder. You also tell us that this conversation took place a few years ago, so she could not have been referring to some obsolete criminal statute that was repealed decades ago.
There has to have been some misunderstanding along the line, because this claim as stated is definitely false.
No, it is not True
No jurisdiction in the United States has, or to my knowledge has ever had, such a law.
More specifically, all states currently recognize defense of others as a legal defense for homicide. No state has a rule that a homicide can only be justifiable if the other person is facing you, which would be absurd.
More than forty states base this part of the criminal code on the Model Penal Code, written by the American Law Institute. §3.05 of its 1962 revision (at the Internet Archive) establishes a justification for “Use of Force for the Protection of Other Persons” as a legal defense. In a state that enacted a provision based on this, a teacher (or anyone else) would be justified in killing someone, if necessary to save the children under their care (or defend anyone else). They would not have a “duty to retreat” unless all the people whom they reasonably believed themselves to be protecting were also able to retreat in complete safety, nor would teachers have a duty to retreat from their workplace.
The same Model Penal Code also has other provisions that might be relevant, such as the “Choice of Evils” defense (where breaking a law becomes justifiable to prevent a greater harm) or “Use of Force by Persons with Special Repsonsibility for the Care, Discipline or Safety of Others,” including “a teacher or another person entrusted with the care or supervision for a special purpose of a minor.”
It is, again, worth noting that the Model Penal Code is a text that has had a great deal of influence on state laws, but is not actually the law anywhere, and every state’s laws are slightly different. Some states consider homicide justifiable to prevent “death or bodily injury” to another, other states “serious bodily injury,” others “deadly force,” others listing specific crimes which killing someone is justified to prevent, and so on. For another example, Oregon, the state I’m most familiar with, has some additional defenses. It deems deadly force justified in defense of premises, under some circumstances, “to prevent the commission of arson or a felony by force and violence by the trespasser” Texas, where the latest school shooting took place, instead presumes that someone who uses deadly force against someone who unlawfully enters their workplace by force has a reasonable belief that the trespasser is is up to no good.
Where Could this Urban Legend Have Come From?
The justifiable-homicide laws of the different states were gradually reformed over the course of the twentieth century. Previously, the English Common Law had held that you could not kill another person to defend anyone but a close relative of yours. (William Blackstone speculated that this defense arose out of the rule that a man could protect his property, since his wife and children were once considered his property.) Another limitation that formerly held (as recently as 1994 in the state of Ohio, or 2021 in Wyoming) was that you had no defense if you attacked someone in the reasonable belief that you were defending an innocent person, but you were mistaken.
It sounds as if your friend was unaware of the “protection of others” defense, and had been told that a teacher could only claim self-defense against a school shooter. This might have arisen from a case where a jury did not believe a defendant had acted in self-defense, because they had shot or stabbed someone whose back was turned, and someone who heard about it jumped to the incorrect conclusion that this were always a crime. Or perhaps it’s a confusion of some advice not to shoot first and ask questions later.