Correct statement is "It has more gravitational potential energy on the shelf than on the table".
GPE = mgh
Where, GPE is the gravitational potential (J), m is the mass of the object (kg), g is acceleration due to gravity (9.8 m s⁻²) and h is the height to the object from ground (m).
Hence, GPE is directly proportional to h means, when h increases, GPE also increases.