You can indeed use the Rx and Tx pins as digital pins. Rx is defaulted as pin 0 and Tx as pin 1. You can indeed change the pins to default as 1 and 2 by modifying the "pins_arduino" header file for your specific board, but you may run into unexpected problems trying to access other pins correctly.
In addition, you may have a hard time uploading code when circuitry is connected to Rx and Tx. Make sure to disconnect anything before uploading.
Without modifying any files yet, all you would have to do is use the standard digitalRead() or digitalWrite() functions on pins 0 or 1, making sure to assign them as inputs or outputs properly.