This was tested on the Raspbian wheezy (2014-01-07)
apt-get update --fix-missing
apt-get upgrade
apt-get dist-upgrade
Use rpi-update to upgrade the kernel (the current version: 3.10.25+, that ships with Raspbian is quite problematic), this is already bundled with the Raspbian, but it's also useful for other distros.
rpi-update
The guys at raspberry forums have made a bash script to automatically find the kernel build version, download the right driver and install it.
More info:
Download the script file
https://dl.dropboxusercontent.com/u/80256631/install-8188eu.tgz | tar xz
Run the script, for more options use -h
./install-8188eu.sh
Check if the driver was successfully installed
lsmod # 8188eu should now appear on the list
Otherwise if you want to compile the driver yourself, follow the guide: here but good luck...
Scan networks availabe
iwlist wlan0 scan
Save the network password into the wpa config file
wpa_passphrase Wi-fi\ Network\ Name password | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
Connect to the network and send logs to background
sudo wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
Renew DHCP lease
sudo dhclient -v wlan0