If the nail holes bother you apply a molding or veneer .
I have some shelves full of pallet wood and sure comes in handy and the price is right .I only use the top and cut the pieces in between the skids that seem to solve the nail and rock issue but there is always the possibility of contamination so I look for pallets that I know what they have been used for and never use the wood for an item that will come in contact with food or be made into a toy .
All this applies to any lumber because you never know the complete history .