Apple does not want you to configure the Time Capsule this way, so they make it extremely difficult to impossible to set things up in this manner.
You did not provide any specific details about what make and model number your wireless router might be, or what device you were trying to use to set up the Time Capsule and which operating system it might be using, so we are basically stuck until we can get some additional information about your specific setup.
A much better choice in terms of performance is to connect the Time Capsule using an Ethernet cable connection to your wireless router, so you can avoid an undesireable and very slow "double hop" wireless situation.
To be honest, this is worst possible way that you can configure the Time Capsule....but we'll try to help if that is what your goal might be.