Havdala in Shul:
It is accustomed to say Havdala in Shul over wine in order to be Yotzei those which do not have wine at home to say Havdala over. [If no one is being Yotzei with this Havdala, it is not to be recited.]
Who should drink the wine? (If the person saying Havdala has in mind to fulfill his obligation with this Havdala, he is to drink the wine himself. If he does not have in mind to be Yotzei with this Havdala that he is saying in Shul he may nevertheless say the Havdala for others, so long as another adult is Yotzei Havdala with him and that adult consequently drinks the wine. If however the wine is drank only by children, no one fulfills their obligation with this Havdala.) [The above follows the ruling of Admur in 295/4. In however 190/4 Admur rules the wine may be drank by any Jew. It may thus be drunk by children. This is a direct contradiction to the ruling in 295/4, and so makes mention Ketzos Hashulchan and Tehila Ledavid. Practically they rule like 190/4 that one does fulfill his obligation if the wine was drank by children. Others however conclude based on this contradiction that initially one may only give the Havdala wine to one who is fulfilling his obligation with this Havdala, or to a [male] child which has reached the age of Chinuch for Havdala. In a case of need or Bedieved, they agree that one fulfills his obligation with a child drinking as written above.]
Should one who has wine at home be Yotzei in Shul?  [If one has wine at home, it is better for him to not fulfill his obligation in Shul in order for him to be able to properly say Havdala for his family when he returns. ] Thus it is the custom today to have in mind not to be Yotzei Havdala in Shul. Furthermore it is accustomed to say Havdala at home even if all of one’s family heard Havdala in Shul as they do not have in mind to fulfill their obligation.
Having in mind to be Yotzei: One who does desire to fulfill his obligation in Shul must have in mind to do so. The person saying Havdala must likewise have in mind to fulfill the obligation for the listeners.  If one had in mind not to be Yotzei Havdala in Shul, he must repeat Havdala upon returning home. This applies even to the person who said Havdala that if he had in mind not to fulfill his personal obligation then he must repeat Havdala or hear it from another person. Regarding if one did not have in mind to not be Yotzei, see previous Halacha!
It is customary to recite Havdala in Shul if there are people there which need to be Yotzei. The wine is to be drunk by someone who listened to the Havdala and fulfilled his obligation. In a case of need the wine may be drunk by any Jew, even children. If one desires to say Havdala upon returning home from Shul, he must have intent not to fulfill his obligation with the Shul’s Havdala. If he did not have this in mind, see the previous Halacha!
 Ketzos Hashulchan 96 footnote 9
Other Opinions: See Shut Min Hashamayim 25 that even if everyone in Shul will say Havdala over wine when they come home, one is nevertheless to say Havdala in Shul, as Berov Am Hadras Melech.
 He however may not drink the wine, as he is still before Havdala. [Ketzos Hashulchan 96 footnote 9] Furthermore he may not drink the wine as one who is fulfilling his obligation with this Havdala is required to drink the wine. [Admur ibid see next footnote]
 As no person which fulfills his obligation with this Havdala has drank the wine. [ibid] Vetzaruch Iyun Gadol from the ruling of Admur in 190/4 [brought earlier in Halacha 8] that Bedieved if one did not drink the Havdala wine Safek Brachos Lehakel, and he is not to repeat Havdala. [Ketzos Hashulchan 97 footnote 6; Tehila Ledavid 295/1; See Kitzur Halachos Miluim p. 109-112, and later in Halacha 16 and footnotes there for how some answer this contradiction.]
 97 footnote 6
 Kitzur Halachos ibid
 As rules Admur in 295/4. They explain the contradiction by saying in 295/4 Admur is referring to the law in Lechatchilah, that Lechatchilah only one who fulfills his obligation is to drink it, and this itself he placed in parentheses due to doubt. However Bedieved even in 295/5 Admur agrees one fulfills his obligation, and therefore Admur there wrote the law in a future tense rather than past, as he wrote “one is unable to fulfill his obligation” rather than “one did not fulfill his obligation”. [Vetzaruch Iyun on the veracity of this inference]
 As opposed to a child which has reached the age of blessings. Vetzaruch Iyun on their source for allowing a child which has reached the age of Havdala, in accordance to Admur in 295/4, as either way such a Katan is not fully obligated as is an adult. Furthermore, in 190/4 Admur differentiates between an older child and younger child, while here in 295/4 he simply writes one may not give it to children, implying any child, even if he has reached the age of Chinuch. Hence seemingly according to 295 /4 one may never give it to any child, and one who desires to be stringent like that opinion, is to only give the wine to another adult male which is fulfilling his obligation.
 Kaf Hachaim 295/15
As if he was Yotzei in Shul he cannot repeat Havdala at home for those that did not hear unless he has children below Bar/Bas Mitzvah that need to hear Havdala. [296/17]
Another reason to not be Yotzei in Shul is because it is better for one to do the Mitzvah himself and not through a messenger. [Kaf Hachaim 296/48]
 Kaf Hachaim 295/15-16