Shivering is common in cold
. However, rib hurting is not a common phenomenon with shivering. Maybe you are sensitive to colds and thereby have inflammation in your lower airways leading to chest tightness
and thereby pain. Also you may have lung sacs thickening due to some past lung disease which rub against each other during shivering causing friction and thereby pain.