Shanghainese is a member of the Wu
dialect family of
chinese, a family which ( although you would never know it) is second only to
mandarin in terms of the total amount of people who speak it. (but it is not closely linguistically related to
nanjing dialect, which is classified linguistically as a southern variant of
mandarin.
Shanghainese is related to dialects such as
Ningbo,
Hangzhou and
Suzhou dialects which are found in southern
Jiangsu province and most of
Zhejiang province. The Wu dialects are similar, but not totally mutually intelligible depending on what two specific dialects you are comparing)
in Shanghainese there are no Mandarin zh ch or sh sounds, instead Shanghainese has more s c z sounds with additional sounds that cannot be easily romanized without resorting to IPA symbols. Also, Shanghainese has no dipthongs. Shanghainese also has a "v" sound, which is uncommon in chinese.
As for the development of Shanghainese, it is a mixture of various dialects which existed in the area before the creation of Shanghai, which subsequently have become mixed to create shanghainese. One of the most notable things about this mixture is that Shanghainese, as opposed to other wu dialects, has a very "wierd" wierd tone system, which is to say that the tones in a word all depend on the first syllable in the word! this is a fairly big departure from "normal" chinese in that Shanghainese seems to be progressing away from having tones...at present there are only 5 in shanghainese as opposed to the normal 8-12 in other wu dialects.
Shanghainese is actually pretty easy to learn if you live in Shanghai and already can speak mandarin, however as it is not essential ( pretty much everyone in shanghai speaks mandarin anyway, except for some old people) there are a lot of people living in Shanghai who never learn to speak good shanghainese.
Another thing, about the similarities between Shanghainese and classical Chinese. Actually classical (I.E. the chinese used for the rhyming schemes in Tang poetry) Chinese is not as close to modern Wu dialects as it is close to modern Min dialects. Sometimes if you read a poem in Shanghainese, it sounds pretty good. A good simple example would be the poem "Chun Mian" by Wang Wei("chun mian bu jue xiao/ chu chu wen ti niao / ye lai feng yu sheng / hua luo zhi duo shao). If read in Shanghainese it sounds better, to my ears, than it does in mandarin
On the other hand, sometimes the rhymes don't work as well in Shanghainese. A good way to prove this is to read any poem where someone is rhyming a word with "gu xiang"- as you have said, the rhymes do not work in either mandarin or shanghainese, but if you pronounce the "gu xiang" in, say, Taiwanese ("go hiong") then the rhyme works.
yet another interesting thing about Shanghainese is that there are none of the standard "cheng yu" (so-called "four syllable phrases" or "proverbs") used in Shanghainese. If you are going to say one, you say it using the Mandarin pronunciation- if you said it in Shanghainese it sounds funny, so nobody does.
Shanghainese is a mainly oral dialect, hence a lot of the more formal mandarin conjunctions have no Shanghainese equivalent, and are simply omitted in conversation, with the meaning of the conjunction being understood from the context. Also the pronouns in Shanghaninese are not "wo, ni, ta" the way they are in Mandarin but rather "ngu, non( this sound is another one that is difficult to write, the ending sort of has a g on it but sort of doesn't- there is an IPA symbol that one can use to write it), yi" and the plural word is not "men", in Shanghainese the plurals are "Alla, na, yila".
About shopping in Shanghai: whether or not one gets ripped off in Shanghai does not depend so much on whether you speak good Shanghainese as much as it depends on where you are shopping. If one shops at a place frequented by tourists, people will try to jack up the prices, regardless of what language you are speaking to them.
On the other hand, if you shop where "normal" people shop and just act natural (don't act as though you are an outsider, don't ask for directions or do anything obvious to indicate that you are not from Shanghai, speak mandarin with a Shanghai accent or better yet speak Shanghainese, even with an accent) people are going to be a lot less likely to rip one off. Also if you are a regular customer at a certain store, obviously people will not try to trick you ^_^