The 32-year-old struck for just the second time in 93 appearances for his country as Ireland came from behind to beat Kazakhstan at the Aviva Stadium in Dublin to give themselves an excellent chance of being seeded among the second group for the UEFA EURO 2016 draw.
But as so often in the past, Ireland were able to rely upon returning captain Robbie Keane to get them out of trouble. The 33-year-old, who missed Friday night's 3-0 Group C defeat in Germany with an ankle injury, converted a 16th-minute penalty for his 61st goal in the famous green shirt.
However, it was O'Shea, whose last and only previous senior international strike came against Australia in 2003, who fired the Republic ahead from point-blank range as he pounced on goalkeeper Andrey Sidelnikov's 26th-minute error.
Ireland dominated the second half and might have increased their lead on several occasions before the unfortunate Shomko turned substitute Aiden McGeady's cross into his own goal. The result meant interim boss Noel King emerged from his two-game spell in charge with the win he craved, and with the approach he took largely vindicated.