It's not uncommon, especially in rice products. There are over 60,000 known species of weevils or "flour bugs" (a type of beetle) and many seem pretty partial to rice and rice products.
Additionally, there are many "pantry" moths and other insect pests with the same (and even richer) tastes in food. Nothing is safe, if it's kept in cellophane, waxed paper, cardboard or even heavy plastic bags. It could be that the shop is at fault, or the supplier...no way to tell, at this distance.
It's certainly NOT your fault, so you should tell the shop-keeper about the problem and get your money back. If the shop-keeper is reasonable, s/he will let you open another pack in the store, to satisfy yourself that the product is a bug-free replacement and then package it nicely for you to take home. If he/she is unreasonable, they will demand to see the original packaging (which you've probably thrown away!) and accuse you of trying to rip them off, by having food in your pantry that is WAY past the "use-by" date. Good luck with it!
http://www.wikihow.com/Get-Rid-of-Weevils-%28Flour-Bugs%29
http://www.wikihow.com/Get-Rid-of-Pantry-Moths
http://www.ipm.ucdavis.edu/PMG/PESTNOTES/pn7452.html