Answer
$$ - \tan \theta + \theta - \sec \theta + C$$
Work Step by Step
$$\eqalign{
& \int {\frac{{d\theta }}{{1 - \csc \theta }}} \cr
& {\text{Multiply the integrand by }}\frac{{1 + \csc \theta }}{{1 + \csc \theta }} \cr
& = \int {\frac{1}{{1 - \csc \theta }}} \cdot \frac{{1 + \csc \theta }}{{1 + \csc \theta }}d\theta \cr
& = \int {\frac{{1 + \csc \theta }}{{1 - {{\csc }^2}\theta }}} d\theta \cr
& {\text{Use the pythagorean identity }}1 + {\cot ^2}\theta = {\csc ^2}\theta \cr
& = \int {\frac{{1 + \csc \theta }}{{ - {{\cot }^2}\theta }}} d\theta \cr
& {\text{Simplify}} \cr
& = - \int {{{\tan }^2}\theta \left( {1 + \frac{1}{{\sin \theta }}} \right)} d\theta \cr
& = - \int {\left( {\frac{{{{\sin }^2}\theta }}{{{{\cos }^2}\theta }}} \right)\left( {1 + \frac{1}{{\sin \theta }}} \right)} d\theta \cr
& = - \int {\left( {{{\tan }^2}\theta + \frac{{\sin \theta }}{{{{\cos }^2}\theta }}} \right)} d\theta \cr
& = - \int {\left( {{{\sec }^2}\theta - 1 + \sec \theta \tan \theta } \right)} d\theta \cr
& = - \int {{{\sec }^2}\theta } d\theta + \int {d\theta } - \int {\sec \theta \tan \theta } d\theta \cr
& {\text{Integrating}} \cr
& {\text{ = }} - \tan \theta + \theta - \sec \theta + C \cr} $$