Linfield, who lost the first leg of their Champions League qualifier at Tolka Park just a month ago, were reduced to 10 men just 18 minutes into the first half.
Matthew Fitzpatrick was sent for an early shower as he was penalised for a high foot which caught the midriff of Milan Mbeng.
Then, three minutes before half-time, the hosts were awarded a penalty which Odubeko skied over the crossbar.
Four minutes later, Shels had another opportunity from the spot. Ben Hall's challenge was late and inside the area, with Wood stepping up this time and making no mistake from 12 yards.
Less than a minute into the second half, Shelbourne doubled their lead. Substitute Caffrey had an immediate impact, pulling the ball back to Odubeko, who found the back of the net from inside the area, atoning for his spot-kick miss.
Seven minutes later the Blues remarkably had a lifeline. Kirk Millar's corner was flicked on by Sam Roscoe, with Offord staying on his toes at the back post to nod home from close range.
David Healy's side were given the chance to equalise from the spot after Patrick Barrett's handball at the back post, but this time it was Offord who failed to capitalise as Wessel Speel got down to his left to save.
Substitute Caffrey put the icing on the cake for the hosts, adding a third to ensure the north Dubliners take a two-goal advantage to Belfast for the second leg next Thursday.