Assuming there is adequate tooth structure remaining, composite resins can be used as a core material for endodontically treated teeth to be crowned provided

there is an adequate ferrule.

the resin has a high contrast colour with tooth structure.

the resin is autopolymerizing.

subsequent crown margins are not located on cementum.