Sheikh `Abd Allah b. Muhammad al-Tayyâr, professor at al-Qasîm University
There is a general axiom in Islamic Law that matters are according to their intentions. Another axiom is that the means to something else takes the ruling of that which the means are taken for.
Allah says: “Help ye one another in righteousness and piety but help ye not one another in sin and rancor: fear Allah: for Allah is strict in punishment” [Sûrah al-Mâ’idah: 2]
If someone takes a job as a truck driver and is charged with the task of transporting liquor to those who wish to purchase it, then without a doubt that person would be helping others in sin and rancor.
On the other hand, if that person is a student learning how to drive a truck and truck you are training in happens to be transporting alcohol, then there is no objection to driving it as long as you have no other option than to learn with that truck and as long as you are not pleased with the transportation of liquor.
This is because the student is not actually being employed in the capacity of transporting liquor, but rather the truck’s real driver is. The student, by taking driving instruction in that truck is not actually contributing anything to the actual transportation of the liquor, and he is not pleased with the fact that it is taking place. He is merely learning how to drive a truck, and necessity forces him to use that truck for a limited period of time so that he can learn the necessary skills from its driver.
This matter falls back upon his intentions. His intention in this case is not to transport liquor, but to learn driving skills from the driver of the truck. The Prophet (peace be upon him) said: “Actions are but by intentions, and every person will have only what he intended.” [Sahîh al-Bukhârî and Sahîh Muslim]
And Allah knows best
Source: Islam Today