The most natural alternative is:
"When we got to the pub, our friends had already left."
We use 'When we got to the pub', because 'got to' refers to the exact moment when you arrived. 'When we went to the pub' refers to a less specific point in time. 'Went to' could be the whole evening, for example, 'We had a good time when we went to the pub last night'.
'Already' can sometimes go at the end of the phrase, particularly in US English, but it is more usual to put it between the auxiliary verb and the main verb.