Wales' World Cup opponents Samoa stunned Australia with a 32-23 victory in Sydney on Sunday.
The Samoans led from the third minute with Alesana Tuilagi and full-back Paul Williams scoring in the first half.
Lock Kane Thompson and centre George Pisi added two further tries in the second half with fly-half Tusi Pisi kicking two penalties and three conversions for the Samoans.
Samoa face Wales in a Pool D game in Hamilton on 18 September.
The Wallabies scored 13 of their points in the 10 minutes when Samoa were reduced to 14 men with lock Daniel Leo in the sin-bin.
Fly-half Matt Giteau scored 18 points from a late try, two conversions and three penalties for Australia.
"The main focus this week was to believe in ourselves. We came out here just to win this game," said try-scorer Tuilagi.
"We know it's going to be a tough game but we believed in ourselves and, thanks God, we did it today."
Samoa will also face holders South Africa, Fiji and Namibia in pool matches at this autumn's World Cup in New Zealand.