pins 0 and 1 in arduino mega

I design a arduino shield that is suppose to use pins 0-7 and 14-21 as digital outputs. I'm getting HIGH values in both pin 0 and 1. I suppose this is due to the fact that these pins are used for serial communications. Is there any way of fixing this issue without changing my board? Like programming unused pins to do the serial communications.

Yes you can use other pins for serial. The Mega has several hardware serial ports and you can use SoftwareSerial on any pins.

However you can only reprogram the board through pins 0 and 1. (USB programming uses those pins.) If you have any other circuit connected to those pins then that can make programming impossible. Some of my Arduinos can only be programmed when they are unplugged from their shield stack.

If you want to use the serial monitor connected via a USB cable, then you must use those pins.

If you can possibly avoid it, don't put any other inputs or outputs on pins 0 and 1.