Wrong.
The castle doctrine does not say you can shoot trespassers.
It says you can shoot if that is necessary in order retain your property.
{...
Depending on the location, a person may have a
duty to retreat to avoid violence if one can reasonably do so. Castle doctrines lessen the duty to retreat when an individual is assaulted within one's own home. Deadly force may either be
justified, the
burdens of production and
proof for charges impeded, or an
affirmative defense against
criminal homicide applicable, in cases "when the actor reasonably fears
imminent peril of death or serious bodily harm to him or herself or another."
[1] The castle doctrine is not a defined law that can be invoked, but a set of principles which may be incorporated in some form in many jurisdictions. Castle doctrines may not provide civil immunity, such as from
wrongful death suits, which have a much lower
burden of proof.
Justifiable homicide
[2] in self-defense which happens to occur inside one's home is distinct, as
a matter of law, from castle doctrine, because the mere occurrence of
trespassing—and occasionally a
subjective requirement of fear—is sufficient to invoke the castle doctrine,[
citation needed] under which the
burden of proof of
fact is much less challenging than that of justifying homicide in self-defense. However, the existence in a legal code of such a provision (of justifiable homicide in self-defense pertaining to one's
domicile) does
not imply the creation of a castle doctrine protecting the estate and exonerating any duty to retreat. The use of this legal principle in the United States has been controversial in relation to a number of cases in which it has been invoked, including the deaths of Japanese exchange student
Yoshihiro Hattori[3] and Scottish businessman
Andrew de Vries.
...}
Castle doctrine - Wikipedia