This is known as a 'referred pain'. Organs in or near the
right hypochondrium (liver area) are supplied by sensory nerves which radiate from the spine, and branch to other
well-defined areas, eg. between the scapulae. Just as
'heart-attack' pain is referred down the left arm, and up to the jaw, so biliary colic is felt in areas distant to the
pain's origin.
If the pain stems from a calculus (stone) trapped in
the common bile duct, the pain is excruciating beyond
endurance - possibly the most severe pain that can be experienced, way beyond the pain of childbirth; or
so I'm told by those who have experienced both.
Surgery is dramatically effective, 100%.