Shaw's 3-point play with 2:10 remaining gave Coastal Carolina a 77-76 lead, Beck extended it to a three-point lead with a basket and Shaw went 1 of 2 at the free-throw line for an 80-76 advantage with 30 seconds to go.
Trevond Barnes answered with a dunk to pull Hampton within two points and end the Pirates' two-minute scoreless stretch. CCU closed the game by making 5 of 6 free throws, including four straight by Shaw.
Amidou Bamba added 14 points and seven boards for Coastal Carolina (5-4). Matt Lindsey made four of CCU's eight 3-pointers and scored 13 points.
Kalin Fisher led Hampton (4-6) with 29 points on 10-of-17 shooting. Jermaine Marrow had 18 points and 10 assists, and Barnes added 13 points, 10 rebounds and two blocks.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.