Cristiano Ronaldo struggled to make any impact against Shamrock Rovers in his first appearance for Real Madrid.
He was given two chances to produce with a free-kick, but sent the first one well wide and the second into the wall.
Indeed, the best scoring chance in the first half fell to the hosts as Sean O'Connor cut in from the right-hand side before sending a low shot just wide.
Madrid looked more dangerous after the break, with Rafael van der Vaart going close twice, the second with a spectacular overhead kick, and another high-priced import, Karim Benzema striking the post in the 56th minute.
Eventually, it was Benzema who won it, latching on to a long ball to score the only goal three minutes from time.