Eruvin, Chapter 7, Mishnah 11. To understand this Mishnah we need some halachic background, which the Mishnah takes for granted:
By Torah law: One who pays money for an item acquires it and takes ownership of it. From the moment he hands over the money, the item is his.
By rabbinic law: The Sages instituted that 'money does not effect acquisition', and the buyer may still retract even after he has paid. The item does not become his until meshichah - until he takes hold of it with physical possession.
The words of the Mishnah:
"Nosen adam ma'ah lachenvani velanachtom kedei sheyezakeh lo eruv, divrei Rabbi Eliezer" - A person gives a ma'ah coin to a shopkeeper or a baker so that they should acquire on his behalf a share in the eruv chatzeiros made in the courtyard shared by everyone.
Although, as stated, by rabbinic law money does not effect acquisition, Rabbi Eliezer holds that with regard to eruvei chatzeiros the Sages made an exception and were lenient, leaving the matter on its original Torah footing, that money does acquire. Therefore, one who gives a coin to a shopkeeper or a baker and says: "I want this money to acquire for me ownership in the items that will be used for the eruv" - this is effective according to Rabbi Eliezer.
"Vachachamim omrim: lo zachu lo me'osav" - In their view we follow the standard halachah here, that money does not acquire the item, and therefore the eruv does not take effect. The Gemara clarifies that this does not help even if the shopkeeper or the baker actually confers a share in the eruv upon all the other residents of the courtyard.
"Umodim bishar kol adam shezachu lo me'osav" - With regard to any other person, the Sages agree with Rabbi Eliezer that the money is effective. The reason: when the giver turns to someone who is not selling him the item - neither a baker nor a shopkeeper - he is not buying the item from him, but rather making him an agent to purchase on his behalf and include him in the eruv. Here the money is not money of acquisition, but merely the appointment of an agent.
And this is the summary of the matter in the words of the Mishnah - "she'ein me'arvin le'adam ela leda'ato": one who gave the money to the shopkeeper or the baker gave it in order to buy the item from them, not in order to make them his agents. He did not ask them to act as agents, but rather to transfer ownership of the item to him in the way they sell to any customer - and that is ineffective according to those who hold that money does not acquire. Even though he asked them to purchase on his behalf for the sake of the eruv, this is not an appointment of an agent but an attempted acquisition, and his intent and understanding are that he is buying the item, not that the other man should become his agent.
The Gemara does explain, however: if he said to him not "buy for me" but "aseh li eruv" - make an eruv for me - then even with a shopkeeper or a baker the eruv would take effect, since this wording explicitly makes him an agent to make the eruv, and he is not asking to buy the item from him.
The view of Rabbi Yehudah:
Rabbi Yehudah comes and limits the rule: when do we say that an eruv is made for a person only with his knowledge, and that he must know in advance and be aware of the eruv being made on his behalf? With eruvei techumin, for there he has a stake in which direction he will go, and whether or not he wants his techum to be in that particular place. But with eruvei chatzeiros it is entirely to his benefit, and therefore an eruv may be made for him whether with his knowledge or without it:
"Shezachin le'adam shelo befanav" - When one does something for his fellow that is entirely to his benefit and advantage, he may do it even not in his presence and without his knowledge.
"Ve'ein chavin le'adam shelo befanav" - But one does not do something for him that may be to his detriment. Therefore with eruvei techumin, which have an aspect of detriment, the eruv is not effective without his knowledge.
In summary: The Mishnah rests on the principle that by Torah law money acquires, while by rabbinic law it does not acquire until meshichah. Rabbi Eliezer permits acquiring a share in the eruv by giving a ma'ah to a shopkeeper or a baker, and the Sages disagree - since this is a purchase from the seller, which is ineffective; and they agree regarding any other person, since there the money is not an acquisition but the appointment of an agent. But if he said "make an eruv for me", it is effective even with a shopkeeper and a baker. And Rabbi Yehudah distinguishes between eruvei techumin, which are made only with the person's knowledge, and eruvei chatzeiros, which are to his benefit, and which may be made for a person even not in his presence.