Can my opponent cast Shock before discarding it?
No they can not cast the Shock.
Comprehensive rule 608 all parts.
The fact that the card text contains 'then' does not make the two parts seperate abilities. The whole effect of drawing then discarding happens in that order while the spell resolves. There is time in between drawing and discarding for the new information to be reacted upon, however there is no break in the resolution.
There is no passing of priority until the spell completely resolves, and thus no opportunity to cast the instant.