The bottom line is that viruses are not alive and not related to cells in any way. The cell theory states that all living things are made of cells, cells are the basic units of structure and function of living things and that all cells come from other cells. Since, viruses are not made of cells and do not use cells in any of their processes, they are not related to the cell theory.
A virus is nothing more than a protein coat surrounding a piece of DNA or RNA. Sure, they can adapt to the environment and respond to stimuli, but they do not use energy, nor do they grow. These are all characteristics of cells.