If you have the bootloader in it, you can use RX (Arduino pin 0) and RX (Arduino pin 1) to upload a sketch with the reset to DTS or so. Look at the schematic of the Arduino Uno and Pro Mini.
If you want to use those pins, and they are hardwired to other signals, you can use the pin 10,11,12,13 to bypass the bootloader and write the sketch directly into the chip with a programmer (or Arduino as ISP). Every one of those signals should allow to be overridden by the signals of the programmer. You can use those signals for a display for example. During programming the display might show weird things, but that is not a problem.
I use the normal way to upload a sketch with RX and TX. I have a few atmega chips with bootloader ready for such projects. If the bootloader or atmega chip gets damaged, I cut it out of the circuit and solder a new one in its place.