If you follow the Arrivals signs at T5 you will be taken on a route to the international baggage hall that bypasses immigration but you still need to go through customs.
If your visa requires proof of entering the UK (a passport stamp) follow the flight connections sign instead until you're through the glass door and then follow the international arrivals signs to the UK Border.