An Erub Tabshilin is required when Yom Tob occurs immediately before Shabbat, in order to allow one to cook on Yom Tob in preparation for Shabbat. Thus, when Yom Tob falls on Friday and Shabbat (as the last days of Pesah fell this year, 5752), we prepare an Erub Tabshilin on Thursday, before Yom Tob, allowing us to cook on Friday in preparation for Shabbat.
The question arises as to how far this Halacha extends in situations where Yom Tob is observed on Thursday and Friday. In such a case, of course, we prepare an Erub Tabshilin before Yom Tob on Wednesday so we may prepare food on Yom Tob for Shabbat. The question is, does the Erub Tabshilin allow us to cook for Shabbat only on Friday, or may one cook already on Thursday – the first of the two days of Yom Tob – in preparation for Shabbat?
The consensus among the Rishonim (Medieval Halachic scholars) is that the Erub Tabshilin allows cooking for Shabbat only on the second day of Yom Tob, Friday. The Rosh (Rabbenu Asher Ben Yehiel, 1250-1327) explains that the observance of the second day of Yom Tob in the Diaspora applies only "Mi’de’rabbanan" (by force of Rabbinic enactment), and not by force of Torah law, and therefore the Sages permitted cooking on the second day for Shabbat through an Erub Tabshilin. This does not apply on the first day, when cooking is forbidden by the Torah. Others explain, quite simply, that cooking for Shabbat is only permitted on Friday, the day immediately preceding Shabbat.
This is, indeed, the ruling of Hacham Ovadia Yosef in his responsa (Yehaveh Da’at 6:32; listen to audio recording for precise citation). He emphasizes that this ruling applies even if somebody is unable to cook for Shabbat on Friday due to circumstances beyond his control. Even in such a case, the Erub Tabshilin does not permit cooking on Thursday for Shabbat. However, he adds, if somebody violated this Halacha and cooked on Thursday for Shabbat, the food is permissible for consumption.
Summary: If Yom Tob falls on Thursday and Friday, we prepare an Erub Tabshilin to allow cooking on Friday for Shabbat. One may not cook on Thursday for Shabbat, even though he prepared an Erub Tabshilin.