Wolves right back Foley was suffering the effects of a hamstring injury when he met up with the squad and will not be part of the travelling party for Poland-Ukraine.
McShane, who can also play at centre back, was drafted into the Ireland squad last week from the initial standby list and played in the weekend friendly win over Bosnia-Herzegovina in Dublin.
The 26-year-old travelled with the panel to their Italian pre-tournament camp at Montecantini and sat out training on Monday with a bruised heel.
Nonetheless, McShane is fit for Euro 2012 and will take the number 13 shirt after Ireland submitted their squad details ahead of Tuesday's Uefa deadline.
Fitness concerns over regular right back John O'Shea, as well as central defenders Richard Dunne and Sean St Ledger, means that McShane provides more suitable cover.
Trapattoni said: “With the injuries that we experienced in the squad over the past week, I have had to make a tough decision when it comes to naming the 23 players that must be submitted to Uefa for the championship.
"Kevin Foley, John O’Shea, Paul McShane, Darren O’Dea, Shay Given had all been carrying knocks and we have been monitoring them closely in their recovery.
"Although Kevin has been recovering well, I have made the difficult decision to leave him out of the 23 player list after completing fitness tests on John O’Shea and Paul McShane this morning.
"I have spoken to him and understand how difficult it is, saying that he can remain with the squad if he wishes.”
Ireland's finalised Euro 2012 squad:
|2||Sean St Ledger|