“Aw shucks, we still don’t know squat!”
When I first read your question, my reaction was that surely this must be explained in every dictionary. But you know what? It isn’t! That must make it confusing to the non-native speaker. The short story is that shucks is a euphemism for shit, making “aw shucks” a watered-down version of “oh shit” that has long ago lost its harsh overtones.
The Merriam-Webster New Book of Word Histories, Merriam-Webster, 1991
The Merriam-Webster New Book of Word Histories (published by Merriam-Webster, 1991) explains its origin as a euphemism at length on page 249:
All languages and cultures seem to have words or practices that are taboo and hence are not mentioned in polite society. Perhaps because of the shock produced when such words are used, many of them have come to function as interjections, the meaning of which is subordinated to their emotional impact. Another result of the social restrictions against using taboo words is the creation of euphemisms that can be used more freely, though naturally much of the intended force may be lost of this substitution.
As can be seen from many of the examples above, the initial sounds of the taboo words are often retained, and the euphemism is created by changing other parts of the word or by using other words that are not taboo and which begin with the same sounds. Thus we have darn and darnation as euphemism for damn and damnation. Shoot used as an interjection is a euphemism for shit, as are shucks and sugar.
Wikipedia tells the same story under its entry for shit, albeit more briefly:
The word shit (also shite in British and Hiberno-English) is usually avoided in formal speech. Minced oath substitutes for the word shit in English include shoot, shucks, and "sugar".
So it’s a simple story though, really. The word shucks falls into the category of a minced oath, much like gosh, darn, dang, heck, shoot, crud, frick, and so many others. That is, it originated (quoting Wikipedia here) as
...a euphemistic expression formed by misspelling, mispronouncing, or replacing a part of a profane, blasphemous, or taboo term to reduce the original term's objectionable characteristics.
English Lexicogenesis, Oxford University Press, 2014
On page 122 of English Lexicogenesis (Oxford University Press, 2014) D. Gary Miller writes, placing its origin at 1843:
Certain body parts are suspect to tabu replacement; cf. butt(ocks) [a.1300], rear (end) , posterior , derrière , gluteus maximum [n.d.]. Among bodily functions, there are such euphemistic deformation as shucks , shoot  for shit, and even dipstick  for ‘penis’ and for dipshit .
Expletive Deleted: A Good Look at Bad Language, Free Press, 2005
One page 100 of Expletive Deleted: A Good Look at Bad Language (Free Press, 2005), Ruth Wajnryb writes:
Once again, the word is serving a multitude of master. In addition, the euphemisms that can replace SHIT (“sugar,” “shoot,” “shucks,” etc.) serve both the general positive use and the negative ones. If ever we needed an example of how meaning is achieved through particular circumstance, SHIT is it.
The positive and negative of uses of shucks exactly match those of shit, as Wajnryb rightly points out.
You can see where it comes from when you see it in phrases like the example given by Oxford Dictionaries Online for it:
- “Thank you for getting it.” “Oh, shucks, it was nothing.”
Or from Collins:
- Because he was worried about his diary – shucks, only a notebook, really – he took it with him.
—Trenhalle, John A MEANS TO EVIL
Collins defines this as
something of little value (esp. in the phrase not worth shucks)
By now you have probably correctly surmised that it’s used exactly the same way that shoot often is. In other words, this usage originated as a minced oath for shit, although no one thinks anything profane, taboo, or rude by it any longer. That’s what happens with minced oaths: they lose their rudeness.
Interjection versus Negative Polarity Item
You might feel that the injection Aw shucks! is somehow different from the negative polarity item found in not worth shucks. Although the low-level part-of-speech classification as an interjection differs from the one in which it occurs as a negative polarity item, there’s no reason to think those have separate origins.
- No shit.
- Oh shit.
- Aw shit, it’s nothing to me.
- Aw shucks, it’s nothing to me.
Negative Polarity Item
- That idea isn’t worth shit.
- That idea isn’t worth shucks.
- That idea isn’t worth squat.
- That idea isn’t worth doodly-squat.
- That idea isn’t worth diddly-squat.
- That idea isn’t worth diddly.
By the time you get to the bottom, the taboo origin can appear to be completely lost. But the matter of using shucks as both injection and a linked negative polarity item is the same one of using shit as both those things. As Professor observed:
Despite the considerable progress that has been achieved over the last two decades, the bad news is that we know squat about the proper treatment of negation and polarity. But then, by the Law of the Excluded Middle, the good news must be that we don't know squat about the proper treatment of negation and polarity.
—Laurence R. Horn, “Flaubert Triggers, Squatitive Negation, and Other Quirks of Grammar.” Perspectives on Negation and Polarity Items, ed. Jacob Hoeksema et al. John Benjamins, 2001)
Pronunciation: Aw shucks ≠ Aw shocks
One last thing: in your question you mentioned “aw shock”. However, shock will never be pronounced the same as shuck. The most common pronunciation of shock in North America is probably /ʃɑk/, although both /ʃɔk/ and /ʃɒk/ also occur frequently enough. That variation is due to various mergers between the vowels in Wells’ canonical lexical sets LOT, CLOTH, and THOUGHT in the many dialects of North American.
Those are the wrong lexical sets for shucks though. The pronunciation of shucks is /ʃʌks/. That means it has the STRUT vowel.
At the risk of being crude, that means that shucks rhymes with fucks, a taboo word. My own conjecture is that shucks as a euphemism for shit owes some of its appeal to the way it takes not only the front-end of shit but also the back-end of fucks, thereby doubling its allusion.