Universities in Quebec have an agreement to automatically transfer credits of each others' visiting students, when students have applied beforehand to have this done by completing and submitting a form to their registrar's office.
The "IUTS" permission form is available at the CREPUQ (Conférence des recteurs et principal(e)s des universités québecoises) web site (click on Autorisation d'études hors établissement and then "English" if you prefer English.)
PLEASE NOTE that inclusion of a course in a program is always subject to the approval of that program's adviser. Students are strongly encouraged to speak to their adviser before taking any course at another institution. As well, the maximum number of credits that may be taken outside of McGill is 1/3 of the total, either for the program or overall.