As you may all know not all countries support the Android market, for example, in UAE and Saudi Arabia the market is blocked as well as in some European countries. Likewise, in my situation, when I bought my SGS it didn't have android market on the phone and the ONLY way to add a market is to root your phone or flash your firmware to a newer firmware such as M2 that includes the market app as a native app BUT, in doing so you will:
1- lose your native language (in my case I lost the Arabic language completely when i flashed my phone)
2- you may void your warranty
so what if I wanted the market but at the same time wanted to keep the original stock firmware? well worry no more cause i've brought with me the ultimate solution!
consider it as a gift and souvenir from my trip to all the forum members
NOTE: please back up your DATA because this process will hard reset your phone! you have been WARNED!
step 1: go to Menu-->settings-->Date and Time--> and check/choose 'use 24-hour format' option
step 2: Then go to phone keypad and type *#272*XXXX# P.S. The 'XXXX' here are not letters but any 4 number digits that tells you your current time. For example, if your clock shows 12:30 PM then enter *#272*1230# and so on.
Step 3: As soon as you enter the code you will be greeted with a settings, simply scroll down and choose 'XSG' ---> then install market
step 4: when market installation is completed the phone will automatically hard-reset itself wiping all your existing DATA on the process.
step 5: reboot your phone and congratulation you now have Android market on your stock firmware!
step 6: enjoy and start downloading apps from the market
FROYO UPDATE: For Froyo users please refer to this method since the method mentioned above works only on Eclair firmware, the 2nd method posted below have been tested on Froyo and is confirmed that it works.
I would like to thank Big Boss and the original founder for bringing this method so there you go guys