Let's set up an example:
(1) She has been to Shanghai.
(2) She has gone to Shanghai.
(1) emphasizes her presence in the city, hence is the normal answer to the query about whether she has experienced the place.
(2) emphasizes the travelling, the moving, so could also be used to answer the question 'where is she?'
There is no 'rule'. Because of the different verbs, however, the sentences can carry different meanings in different contexts.