At extreme pressures and temperatures common materials form new dense phases with compacted atomic arrangements. By classical molecular dynamics simulation we observe that FCC copper undergo phase transformation to BCC structure. The transition occurs under shock wave loading at the pressures above 80 GPa and corresponding temperatures above 2000 K. We calculate phase diagram, show that at these pressures and low temperature FCC phase of copper is still stable and discuss the thermodynamic reason for phase transformation at high temperature shock wave regime. Titanium forms new hexagonal phase at high pressure as well. We calculate the structure of shock wave in titanium and observe that shock front splits in three parts: elastic, plastic and phase transformation. The possibility of using a phase transition behind a shock wave with further unloading for designing nanocrystalline materials with a reduced grain size is also shown.