To get more detailed, you pay all costs to alt. cast the Shoal. Then once the Shoal resolves, it check the CC of the targetted spell and then will either counter it or not after checking the cost of the RFG-ed card.
Correct.
To clarify, here is the text of REB vs. Pyroblast as Matt brought up.
Pyroblast:
Choose one — Counter target spell if it’s blue; or destroy target permanent if it’s blue.
REB:
Choose one — Counter target blue spell; or destroy target blue permanent.
Technically, it is possible to Pyroblast any permanent, but it does not destroy that permanent unless it is blue. REB on the other hand cannot be played at all if there is no blue permanent on the board (assuming empty stack). Pyroblast was in heavy use during the days of Black Vise, since it is possible to dump it on a random land and save some life. This all changed however when Mis-D starting seeing greater play, since if Pyroblast targets a permanent (say, B2B) then it is possible to Mis-D it to any permanent, including your own Island. The same cannot be said regarding REB, which must be Misdirected to another blue permanent and in most cases there isn't another blue permanent so Mis-D can have no effect.
Knowing these wordings determined a lot of control mirrors back when B2B was popular, and I saw a lot of players lose even with REB because they never let the stupid B2B resolve and target it with the other mode.
Similar to Pyroblast, Shoal can technically target any spell on the stack as long as all of it's costs are paid, however it only has an effect if the removed spell matches up with the CC of the targetted spell.