When the shrimp starts to decay, ammonia is a byproduct. Bacteria start growing in the tank that convert ammonia to nitrites.Then another bacteria converts the nitrites to nitrate. That is why people use dead shrimp to start the nitrogen cycle going. You can leave it in there for a few days. Some people leave it in until it is completely gone. I don't know if it matters too much if it is a fresh dead shrimp or a frozen raw shrimp. Basically, you need something to start producing ammonia.