For the record, rooting causes a violation of the guarantee policy of Samsung.
Furthermore there is a possibility of damaging the Android-system(bricking).
This has not happen as far as I know, but it should be mentioned.
As advanced user it is usually always possible to recover the system, but still, just to let you know.
So whoever takes the risk, takes the responsibility
Advice: Use a PC without any drivers or software from other Android devices, this may causes conflicts with the drivers in the ADB.
Rooting via Recovery mode(SD card)
1. Download this Zip-file copy this into the internal SD card.
2. While switched off, keep the following buttons pressed. Release the power-button once the Samsung Galaxy W(I8150) is switched on.
Note: This instructions is written for the stock recovery. Custom recovery should work similarly.
3. Navigate with the volume up and down to apply sdcard:update.zip in Recovery Menu. To confirm your selection use the home-button.
4. Choose (with volume buttons) the update.zip file on your internal sd card and confirm again with Home-button. You will have to wait 5 seconds.
5. Now choose reboot system now and confirm with home button.
Now you device should be rooted. U can also see a Superuser icon appear under Applications.
* To unroot, download this Zip-file and follow above guide to unroot.