Before downloading you need to get the cookie.
wget --save-cookies ~/.cookies/rapidshare --post-data "login=USERNAME&password=PASSWORD" -O - https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi > /dev/null
The command is one line and -O - is capital alphabet O.
This puts your cookie under .cookies folder under your home directory with the name rapidshare.
Now whenever you need to download anything just enter
wget -c --load-cookies ~/.cookies/rapidshare