"Shock probation" or more accurately "shock community supervision" is a provision in the Texas Code of Criminal Procedure that allows a judge to temporarily send a defendant to prison or jail before returning him or her before the court and sentencing him or her to community supervision. In essence, it is a scared straight provision found in Texas Code of Criminal Procedure Article 42.12 Sections 6 and 7.
Section 6 covers felonies and states that after a judge sentences a defendant to prison the judge retains jurisdiction over the case for a period of 180 days. Upon motion from the state, or written motion of the defendant, the judge must conclude that the judge wants to suspend further execution of the sentence and place the defendant on community supervision. The judge can do this if he or she believes that the defendant would not benefit from further imprisonment, the defendant is otherwise eligible for community supervision, and that the defendant has never before been incarcerated in a penitentiary serving a sentence for a felony.
This means that a defendant can be sentenced to 10 years in the Texas Department of Corrections, but ordered back within 6 months to have his sentence converted to a community supervision sentence. It is a valuable tool for a defendant who has made a large mistake, but has never gone to prison. It can be a beneficial way to keep someone from serving a lengthy prison sentence.
The provision on misdemeanors is roughly the same, but far less valuable since the maximum amount of time you can serve is 1 year.