1,154. Blowing or Hearing Shofar Without Intention
Hilchos Shofar, Succah v’Lulav 2:4
One who occupies himself with blowing shofar in order to learn the skill does not fulfill his obligation. Similarly, if one hears the shofar from a person blowing it casually, he does not fulfill his obligation. If the one hearing the shofar had the intention to fulfill his obligation but the one blowing it did not have the intention to discharge the listener, or if the one blowing shofar had the intention to discharge the mitzvah for his friend but the one listening did not have that intention, then the one listening does not fulfill his obligation. Both the one blowing shofar and the one listening must have this intention.
Hilchos Shofar, Succah v’Lulav 2:5
Let’s say that someone blew shofar with the intention to discharge the mitzvah for all those who may hear it and someone listening heard it while having the intention to fulfill his obligation. Even though the one blowing did not have specific intention for this person - he didn’t even know about him! - the listener nevertheless fulfills his obligation because the shofar-blower intended anyone who might hear him. Therefore, if someone is on a journey or sitting in his house and he hears the shofar being blown in shul, he fulfills his obligation – assuming he has the intention to do so - because the one blowing in shul has the intention to discharge the mitzvah for the community.